1. Miller Rhodes
  2. PowerBuilder
  3. Wednesday, 13 September 2023 18:24 PM UTC

Currently, I am attempting to integrate the SMTPClient object into my application using PB 2022 R2.

Our SMTP server does not require a username / password if you are inside the firewall. I cannot seem to get the 

object to send an email successfully without providing values  in these 2 attributes :

 

smtpclient.Username and smtpclient.password

 

Is there a way to tell the object that no pwd / username is required ?

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 September 2023 18:41 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Miller;

  This is a known bug in the SMTPClient that will be fixed in the next upcoming PB 2022 R2 MR See ticket #10785, 10806.

If you look at ticket #10785 though, you will see that there is a downloadable "hot fix" available for this limitation if you would like to try it.

HTH

Regards.. Chris

 

Comment
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Thursday, 21 September 2023 23:46 PM UTC
  2. PowerBuilder
  3. # 1

Here is an update.

 

I have been able to get the SMTPClient to send emails without credentials with the Hotfix applied.  However, this will only work if I send email to people

on the same domain.

The moment I try to send to gmail or any outside domain then credentials must be used again.

I noticed that C# has an SMTP client object that has a UseDefaultCredentials attribute. I used SnapDevlop to play around with some code using that object 

and it basically passes through my credentials without exposing them.  I wonder if we could do something similar..

 

 

Comment
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 21:47 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris,

 

I can just use the userid and password with the Hotfix taken out.  I did get this data when I used the SendAsync()

 

Comment
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 21:34 PM UTC
  2. PowerBuilder
  3. # 3

Are you using the Send() or the SendAsync() command?   I have tried using both

Is your system using a Proxy Server (ie: SetProxy command required)?  I am currently not using a Proxy server

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 14 September 2023 21:44 PM UTC
Thanks for that update!

Note that the hot fix might still be too early a fix for every environment and may still need tweaking by Engineering.

Please open a support ticket for this issue and also reference ticket # 10785 for Engineering to investigate further.

In the mean-time - even with the hot fix - does using the UID & PWD still work as a workaround?
  1. Helpful 1
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 21:23 PM UTC
  2. PowerBuilder
  3. # 4

I added the Hotfix and simply commented out the 2 lines that set userid/pwd and now I get this error :

 

-13 Failed sending network data.

 

My sends were working with the userid and pwd before implementing the Hotfix

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 14 September 2023 21:31 PM UTC
Hi Miller;

Are you using the Send() or the SendAsync() command?

Is your system using a Proxy Server (ie: SetProxy command required)?

Regards .. Chris
  1. Helpful
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Wednesday, 13 September 2023 23:00 PM UTC
  2. PowerBuilder
  3. # 5

Yes Chris, I would like to try it ..Thank you !!

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 13 September 2023 23:39 PM UTC
Great... it's a public ticket - so here is the link: https://www.appeon.com/standardsupport/search/view?id=10785
  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.