- Christopher Craft
- PowerBuilder
- Wednesday, 29 April 2020 10:28 PM UTC
PB 2017 R3
I have come across an issue recently with customers complaining that when they process documents to email the email will just randomly stop working. Without going into all the detail my Email object is designed to create a mail session, LogOn, set the parameters, Send the Email, LogOff and Destroy the object. This has been this way for years. Now it seems the latest OS or Citrix, or... is having an issue. It seems the calls to LogOn and LogOff for every email is causing timing issues so it gets hung up.
The solution to this (I thought) was to simply create the MailSession object as a Shared Object and place the LogOn in the Constructor and the LogOff in the Destructor so they only execute once for the application. But what I am seeing is if the Mail client (Outlook in this case) is not currently running it will properly start it up and send the email but it still closes right after the Send! There is no LogOff going on anywhere else. The object is correctly staying around until the app closes (I put in MessageBox's) so I am confused as to why the Send would always close the client? I have also tried using NewMailSession for the LogOn thinking it needs its own pointer but it still closes after the send.
Any thoughts on this? I am needing to come up with a solution because the customer cannot upgrade their 2008 servers to 2016 with this issue.
Side Question: The above was using SimpleMAPI which starts up Outlook.exe. When I tried Extended MAPI I do not get OutLook.exe started but it sends email? What is happening there? I can't use Extended because of the bug where it gets stuck in the outbox.
Thanks!
Chris Craft
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.