PBNISMTP issue in PB2017
- Issue
- PBNI
- Catherine Ryan
- PowerBuilder
- Thursday, 8 March 2018 09:19 AM UTC
Hi all,
I am having an issue with PBNISMTP in PB2017. The same code works fine in PB12.0 - in the same environment (running on the same machine, using same email server etc…). The issue occurs in both the 2017 IDE and EXE.
As far as I can tell we have all the PB17 dlls in place and I successfully imported the pbnismtp2017.pbx into my PB2017 project. I also copied it into the Program Files(x86)\Appeon\Shared folder and our application directory.
Interestingly it’s when I get to the last line in my code (the Send function) that it throws the PBXRuntime error (Error calling method of a PBNI object). So it’s executing the rest of it ok.
l_smtp = CREATE n_cpp_smtp
l_smtp.SetErrorMessagesOff()
l_smtp.SetRecipientEmail (ls_email )
l_smtp.SetSenderEmail ( ls_sender )
l_smtp.SetSubject (ls_subject )
l_smtp.SetMessage ( ls_message, True )
l_smtp.SetSMTPServer ( ls_server)
//Send the email
li_rc = l_smtp.Send ( )
Any ideas why the Send function may be causing this error?
I've tested it in 2 different environments in both PB12 and PB17 - 12 works fine every time and 17 gives the same error every time.
Any help/thoughts appreciated!
Catherine
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.