1. Subhrajyoti Ghosh
  2. PowerBuilder
  3. Tuesday, 29 January 2019 07:03 AM UTC

Hello All,

I am using "Outlook.Application" for sending emails through PowerBuilder 12.6. The issue I am facing here like, 

It is working as per the code written and able to send emails in Development region.

But in Test/UAT region where PB is not installed, it is not able send mail through Outlook. Neither it is throwing any error that not able to connect to the "Outlook.Application" through Ole.

Although after the build, I have put all the .dll files present in PB-Shared folder so that I can get all the dll files support what I am getting in Dev region.

 

Can you Please help me on this? I have no clue why and how to fix this issue.

 

Thanks in advance ,

Subhrajyoti

Falguni Patel Accepted Answer Pending Moderation
  1. Thursday, 3 June 2021 08:18 AM UTC
  2. PowerBuilder
  3. # 1

Hi,

I have managed to implement this successfully on development pc. The testing of 64 bit .pbd is also sucecessful. However, the deployment of this to 64 bit client pc return (smtpDisconnect) returns code -99 - timeout.

 

May I please have assistance to deploy this? 

 

Kind regards,

Falguni

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 3 June 2021 14:35 PM UTC
Hi Falguni;

Did you use the "PB Packager" utility to create a 64bit runtime install MSI and then run that MSI on the deployment machine?

Regards ... Chris
  1. Helpful
There are no comments made yet.
Alexander Skorokhodov Accepted Answer Pending Moderation
  1. Saturday, 5 September 2020 00:23 AM UTC
  2. PowerBuilder
  3. # 2

Roland:

I am very interested in your solution:

Using SMTP, your app communicates directly with the email server so Outlook is completely bypassed. 

however, the PBNISMTP sample app https://www.topwizprogramming.com/pbnismtp.html

is written in PB 10.5, and it has the required .pbx file.

I m now using PBL 2019, so my request is:

do you have  the PBNISMTP sample app in PBL 2019?

 

thank you.

sasha

 

 

 

Comment
  1. Roland Smith
  2. Saturday, 5 September 2020 02:30 AM UTC
The code is PB 10.5 but will migrate to PB 2019 without issue. The .pbx file is required and is not version specific.
  1. Helpful
  1. Alexander Skorokhodov
  2. Saturday, 5 September 2020 02:44 AM UTC
yet another piece of knowledge for me....

thank you

sasha
  1. Helpful
There are no comments made yet.
Subhrajyoti Ghosh Accepted Answer Pending Moderation
  1. Wednesday, 30 January 2019 08:56 AM UTC
  2. PowerBuilder
  3. # 3

Thank you Everyone for you time and suggestions. Soon after posting this question I was able to find out the issue. The problem was with Outlook profile. Provider account (which was supposed to send the mail ) was not setup in outlook. So PB code was executed but no mails were sending.

 

Thank you All.

 

 

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 5 September 2020 13:25 PM UTC
Please mark this as the accepted answer.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 29 January 2019 15:47 PM UTC
  2. PowerBuilder
  3. # 4

You could abandon the idea of sending email through Outlook and use SMTP.

Using SMTP, your app communicates directly with the email server so Outlook is completely bypassed. See this page for example code:

http://www.topwizprogramming.com/pbnismtp.html

The pbnismtp.pbx file must be deployed with your app and can go with the PB runtime DLL files.

 

The only potential downside to SMTP is that there is not a record of the email in the sender's 'Sent Items' folder in Outlook.

To get around this, use BCC to send a copy of the email to a non-person mailbox that can be viewed in Outlook by anyone who would need to see the emails.

You might have to have the administrator of your company email server to activate SMTP. It isn't always turned on by default. If you are using Office 365, the mail server is actually at a Microsoft server farm. It is possible to use SMTP with Office 365 or even GMail.

 

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Tuesday, 29 January 2019 13:23 PM UTC
  2. PowerBuilder
  3. # 5

Is Outlook installed on the Test/UAT machine? If so, is it configured properly?

Do you have all of the correct PB DLLS installed on the Test machine? It's possible PB packager missed one (and I'm sorry I can't give guidance on which to check).

Comment
  1. John Fauss
  2. Wednesday, 30 January 2019 02:05 AM UTC
Yes, accessing Outlook via OLE requires that Outlook be able to utilize an Outlook profile when establishing the connection. Outlook documentation on MSDN states that if an Outlook profile is not specified via code, the connection attempt tries to use a default profile. I presume Outlook individual and default profiles are managed by the Outlook Administrator.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.