cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Emails not routing through SMTP using WP Mail SMTP, with GoDaddy localhost SMTP settings

Hi all, 

 

Sorry for the long post - I've spent over two weeks on this issue and I am beginning to pull my hair out. I've been passed between multiple support lines, with everyone blaming the other party... goDaddy included.

 

Firstly, I have a WordPress Multisite setup, with the below settings:

Versions: WordPress: 5.5.1
WordPress MS: Yes
PHP: 7.4.9
WP Mail SMTP: 2.4.0

 

I am using ContactForm7 to collect the information and the WP Mail SMTP plugin to send these emails (contact form submissions). The end email inbox is a Microsoft 365 inbox. 

 

I initially set up SMTP using SendGrid, which was working fine until, well, it wasn't. I started noticing that all emails sent were getting blocked - with the following error

 

550 "JunkMail rejected - o1678912x138.outbound-mail.sendgrid.net [167.89.12.138]:36057 is in an RBL, see https://www.spamhaus.org/sbl/query/SBL496551"

 

I opened a support ticket with SendGrid, but I haven't heard anything from them. 

 

Onto the next plan... I followed the WP Mail SMTP documentation (https://wpmailsmtp.com/docs/how-to-set-up-the-outlook-mailer-in-wp-mail-smtp/) to setup the Outlook Mailer using Azure. I am the admin on the Office 365 account, so I tried setting up a new user / shared mailbox and sending email from this. 

 

However, this didn't work either and I got the following error message when trying to send a test email through WP Mail SMTP:

Params:
Mailer: outlook
Constants: No
App ID/Pass: Yes
Tokens: Yes

Debug:
Mailer: Outlook ResourceNotFound: Resource could not be discovered.

After speaking with Microsoft, they sent me some SMTP details to use (below), but these were blocked by GoDaddy as they used port 587 - so no emails sent this way either.

Office 365 SMTP Settings

Host: smtp.office365.com​

Port: 587​

Username: Your Office 365 account email​

Password: Your Office 365 account password​

Encryption: TLS

 

I use GoDaddy's localhost & port 25 "Other SMTP" - and I can now see the emails being sent, but they are being sent to junk mail inboxes for all 365 inboxes I try and send them to.

 

I've tried updating the Email Routing to "Remote Mail Exchanger" and I'm not sure that this has had any affect... maybe?

 

The weirdest f'ing thing though, and I'll try my best to explain it... When using GoDaddy's localhost / port 25 SMTP details, I send an email from my CPanel email (hello@mydomain.com) to any outlook inbox (example@mydomain2.com) - where mydomain.com is the admin account for the multisite, and mydomain2.com is a website under my multisite that I'm trying to send emails from - and the email would 'bounce' back to the admin account email (mydomain.com). In my CPanel, I've setup the default address for all domains to by my admin email (hello@mydomain.com) - but this is only for unrouted email. So basically, any email sent from my CPanel / main domain to any outlook365 inbox is being unrouted, and delivered back to my CPanel / main domain inbox. It's baffling me to be honest. This is also happening sometimes when I try and submit a message via the contact form online - I can see in the logs that the email to the customer sent without any issue, but the email to the outlook inboxes was 'unrouted' and appeared in my CPanel default mailbox. 

 

I can also see in the Message-ID of sent emails from 'mydomain2.com' that they are actually from '@mydomain.com' instead... Not sure if this is an issue or not either.

 

Any help would be hugely appreciated. 

 

Thanks,

1 ACCEPTED SOLUTION
Super User IV

@Cactusman07 & @frankolmedo 

 

So GoDaddy requires you to use their Relay Server for SMTP from their cPanel / VPS / Dedicated Server. You can find the login information on the dashboard for the server.

 

GoDaddy does this to prevent the server / IP from getting flagged for email spam. That said if you have a service which can do sending via an API then it will work, for example I use Amazon SES to send from WordPress and this works great.

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

3 REPLIES 3

Hello Cactusman07,

I have a similar problem.

I did tests from Webmail and the messages can be sent, but I am not receiving any messages.

 

I get an error message:

550 5.4.1 Recipient address rejected: Access denied. AS (201806281)

 

Unfortunately, GoDaddy does not provide any technical support to its customers.

Good luck.

Yup - GoDaddy seem to have the strictest rules out of any hosting provider I've ever seen when it comes to emails. Completely over the top. I even got given SMTP details by Microsoft to use, but they failed because I couldn't use the port no that they provided me with. GoDaddy blocks it...

 

Details: 

Office 365 SMTP Settings

Host: smtp.office365.com​

Port: 587​

Username: Your Office 365 account email​

Password: Your Office 365 account password​

Encryption: TLS

 

Results:

Versions:
WordPress: 5.5.1
WordPress MS: Yes
PHP: 7.4.9
WP Mail SMTP: 2.4.0

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: OpenSSL 1.0.2k 26 Jan 2017
Apache.mod_security: No

Debug:
Mailer: Other SMTP

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

SMTP Debug:

2020-10-09 08:28:58 Connection: opening to smtp.office365.com:587, timeout=300, options=array()

2020-10-09 08:29:12 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:587 (Connection refused) [/home/xxxx/public_html/wp-includes/PHPMailer/SMTP.php line 344]

2020-10-09 08:29:12 SMTP ERROR: Failed to connect to server: Connection refused (111)

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

 

Interestingly, on that github link, there is a specific section relating to GoDaddy:

 

"GoDaddy

Popular US hosting provider GoDaddy imposes very strict (to the point of becoming almost useless) constraints on sending an email. They block outbound SMTP to ports 25, 465 and 587 to all servers except their own. This problem is the subject of many frustrating questions on Stack Overflow. If you find your script works on your local machine, but not when you upload it to GoDaddy, this will be what's happening to you. The solution is extremely poorly documented by GoDaddy: you must send through their servers, and also disable all security features, username, and password (great, huh?!), giving you this config for PHPMailer:

$mail->isSMTP();

$mail->Host = 'localhost';

$mail->SMTPAuth = false;

$mail->SMTPAutoTLS = false;

$mail->Port = 25;

GoDaddy also refuses to send with a From address belonging to any aol, gmail, yahoo, hotmail, live, aim, or msn domain (see their docs). This is because all those domains deploy SPF and DKIM anti-forgery measures, and faking your from address is forgery."

 

And then everytime you talk to one of their support team they're like "Oh but it's working on my end and I can't see anything wrong" - when they should really just tell you this information up front and stop wasting everyone's time.

 

Makes me think it's time to switch hosts to be honest.

Super User IV

@Cactusman07 & @frankolmedo 

 

So GoDaddy requires you to use their Relay Server for SMTP from their cPanel / VPS / Dedicated Server. You can find the login information on the dashboard for the server.

 

GoDaddy does this to prevent the server / IP from getting flagged for email spam. That said if you have a service which can do sending via an API then it will work, for example I use Amazon SES to send from WordPress and this works great.

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post