SMTP Server keeps failing

Hi,

I'm working with a wordpress plugin called Easy WP SMTP. It uses a Send Mail Protocol to send email notifications to users.

While configuring, I'm encountering a lot of issues getting the microsoft server to authenticate. I've tried support from Wordpress, Easy WP SMTP, and everything points to the Microsoft server. The error message I get is:

CLIENT -> SERVER: EHLO [my website's domain]
CLIENT -> SERVER: STARTTLS
CLIENT -> SERVER: EHLO [my website's name]
CLIENT -> SERVER: AUTH LOGIN
CLIENT -> SERVER: c2dAYWFtLWFkdmlzb3J5LmNvbQ==
CLIENT -> SERVER: YWFtXzIwMTc=
SMTP ERROR: Password command failed: 535 5.7.3 Authentication unsuccessful [SG2PR0401CA0020.*******]
SMTP Error: Could not authenticate.CLIENT -> SERVER: QUIT
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

I have ran several checks. My email is hosted by outlook/microsoft.

Please provide me with the correct instructions to get it up and running again.

regards,

Oskar

Hi Oskar,

 

Since it is third party plugin related issue, I’d like to confirm if you can send email directly via Outlook.

 

If you can successfully send email from Outlook, you need to contact Wordpress support team for targeted help.

 

Your time and understanding will be highly appreciated.

 

Thanks,

Huni  

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Huni,

Prior to this SG@********** didn't exist. My company has now included a license and mailbox for it.

As mentioned, all things from the third party has been resolved. It's just a question of why the SMTP authentication keeps failing from outlook despite giving this account an outlook as you mentioned.

SMTP ERROR: Password command failed: 535 5.7.3 Authentication unsuccessful [SG2PR06CA0163.**********]
SMTP Error: Could not authenticate.CLIENT -> SERVER: QUIT
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

regards,

Oskar

----PII has been removed by moderator----

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Oskar,

 

As far as I know, Easy WP SMTP has own SMTP Configuration Setting. If you can send emails not using this plugin, you may check whether you correctly set the SMTP settings in Easy WP SMTP.

 

Thanks,

Huni

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Huni,

This is the same person, different account to AAMAdminOne.

The email address used for the AAMAdminOne works in sending emails from my wordpress forms. But we want a neutral email - not my work email to send. The original email we used to send before migrating to Microsoft is: *******

This has been giving us problems for SMTP. So I changed 'sg' to something else and am using this account to post a reply.

I've also since installed a different plugin (WP Mail SMTP) to test if indeed  Easy WP SMTP (the original plugin) that's giving me problems. The error message is as follows:

Versions:
WordPress: 4.9.4
WordPress MS: No
PHP: 5.6.34
WP Mail SMTP: 1.2.5

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: office.outlook.365.com
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: Yes
SMTP Debug:
2018-03-14 01:57:41 Connection: opening to office.outlook.365.com:587, timeout=300, options=array ( ) 2018-03-14 01:57:42 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known 2018-03-14 01:57:42 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to office.outlook.365.com:587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) 2018-03-14 01:57:42 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) 2018-03-14 01:57:42 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Wordpress/Siteground has also helped me log in and verified the problem is not from them.

Can you please advise what other troubleshooting steps you can do?

Regards,

Oskar

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Oskar,

It seems that your SMTP host name is wrong. You can refer to the following article:

https://blogs.msdn.microsoft.com/azureossds/2017/04/20/an-example-of-setting-wordpress-email-with-office-365-smtp/

Regards,

Huni

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks Huni,

But it still doesn't work.

1. Configuring host:

smtp.office365.com from outlook.office365.com

Still gives me the error:

Versions:
WordPress: 4.9.4
WordPress MS: No
PHP: 5.6.34
WP Mail SMTP: 1.2.5

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: smtp.office365.com
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: Yes

2. When I switch off authentication, the message is:

Versions:
WordPress: 4.9.4
WordPress MS: No
PHP: 5.6.34
WP Mail SMTP: 1.2.5

Params:
Mailer: smtp
Constants: No
ErrorInfo: The following From address failed: ************ : MAIL FROM command failed,5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [PS1PR0601CA0108.************] ,530,SMTP server error: MAIL FROM command failed Detail: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [****************] SMTP code: 530SMTP server error: MAIL FROM command failed Detail: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [*******************] SMTP code: 530
Host: smtp.office365.com
Port: 587
SMTPSecure:tls
SMTPAutoTLS:bool(true)
SMTPAuth:bool(false)

Server:
OpenSSL: Yes

Any other ideas you can help?

Regards,
Oskar

----PII has been removed by moderator----

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Oskar,

 

Thanks for your detailed information.

 

For your situation, I need to do more research and consult, I’ll update in 3 days.

 

Meanwhile, you can retry the following setting to set Up SMTP using the WP Mail SMTP Plugin:

Host: smtp.office365.com

Port: 587  [Non-Encrypted – Port 25 / Secure (SSL) – Port 465)

Username: Your Office 365 account email

Password: Your Office 365 account password

Encryption: TLS

 

Moreover, I’d like to confirm if you can sent emails via Outlook directly.

 

Thanks,

Huni

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Oskar,,

 

You can also refer to Option 3 of the following article to set up SMTP and see if it can be helpful:

https://support.office.com/en-us/article/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-office-365-69f58e99-c550-4274-ad18-c805d654b4c4

 

Thanks,

Huni

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Oskar,

Do you need any further assistance?

Thanks,

Huni

-------------------------------------------------
If you feel a reply works for you, please kindly vote or mark it as it will be beneficial to other community members reading this thread.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated July 5, 2023 Views 9,411 Applies to: