1. John Murphy
  2. PowerBuilder
  3. Wednesday, 6 October 2021 22:00 PM UTC

My admin swears he has set my account to allow it but I get the following errors.

using  - STARTTLS error - Send Email Error: -4 535 5.7.139 Authentication unsucessful, the user credentials were incorect. [MN2PR15CA0001.namprd15.prod.outlook.com]

using - SSL/TSL error - Send Email Error: -4 The token supplied to the function is invalid.

I tried with Auth Method LOGIN and XOAUTH2 - actually I tried every combo of Auth Method and Connection Type

I also tried with my email address and windows username.

This is what I first thought would work as the same settings work with gmail.

dw_settings.SetItem(1, "server", "smtp.office365.com")
dw_settings.SetItem(1, "userid", "john.murphy@whartonhardware.com")
dw_settings.SetItem(1, "password", "**")
dw_settings.SetItem(1, "port", 587)
dw_settings.SetItem(1, "conntype", 1)
dw_settings.SetItem(1, "authmethod", 2)
dw_settings.SetItem(1, "characterset", "windows-1252")

Works with gmail:

dw_settings.SetItem(1, "server", "smtp.gmail.com")
dw_settings.SetItem(1, "userid", "john.murphy@mssrfc.com")
dw_settings.SetItem(1, "password", "**")
dw_settings.SetItem(1, "port", 465)
dw_settings.SetItem(1, "conntype", 1)
dw_settings.SetItem(1, "authmethod", 2)
dw_settings.SetItem(1, "characterset", "windows-1252")

Email from my admin:

John, under your mailbox everything is checked

Outlook on the web

Outlook desktop

Exchange web services

Mobile (Exchange active sync)

IMAP

POP

Authenticated SMTP

 

 

 

 

 

 

 

 

 

John Murphy Accepted Answer Pending Moderation
  1. Thursday, 7 October 2021 23:43 PM UTC
  2. PowerBuilder
  3. # 1

Oops!!!  It turns out the admin needed to type in all the passwords and messed up mine.  My email was working from Outlook so I did not suspect a problem.  

Here are the settings that worked.

dw_settings.SetItem(1, "server", "smtp.office365.com")

dw_settings.SetItem(1, "userid", "john.murphy@whartonhardware.com")
dw_settings.SetItem(1, "password", "**")
dw_settings.SetItem(1, "port", 587)
dw_settings.SetItem(1, "conntype", 2) // STARTTLS
dw_settings.SetItem(1, "authmethod", 2) // LOGIN
dw_settings.SetItem(1, "characterset", "windows-1252")

Comment
  1. Mark Goldsmith
  2. Friday, 8 October 2021 00:39 AM UTC
Good stuff John, glad to hear you got it resolved!
  1. Helpful
There are no comments made yet.
Mark Goldsmith Accepted Answer Pending Moderation
  1. Thursday, 7 October 2021 16:10 PM UTC
  2. PowerBuilder
  3. # 2

Hi John,

This may not make a difference since you said you tried every combination of authentication method and connection type, however I believe the encryption/ connection type for smtp.office365.com is supposed to be STARTTLS (which is actually in the error message you provided) which would be 2 instead of 1 for your dw setting.

Now, there may be other issues/ settings preventing you from authenticating but at a minimum I would change that setting and then see if the error message changes.

HTH...regards,

Mark

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.