I'm trying to send emails from both my personal/business accounts on Gmail, But I get an error:
SMTP ERROR: Failed to connect to server: Connection refused (111)
Here are the options:
Host = 'smtp.gmail.com' SMTPAuth = true Username = 'mygmailaccount@gmail.com'
Password = '******' SMTPSecure = 'tls' Port = 587
I executed the same code on another website hosted on another hosting and it worked fine, After searching it seems that Godaddy is blocking sending emails from other mail servers.
So I tried the following options:
Host = 'relay-hosting.secureserver.net'; Port = 25; SMTPAuth = false; SMTPSecure = false;
But the email was sent to the 'Spam' folder.
I have been trying for days now without any success.
So how to fix this issue?
Hi @mdev_mdev. Thanks for being part of GoDaddy Community! It's true that you would not be able to send email from a hosting plan with GoDaddy using an SMTP server other than relay-hosting.secureserver.net. I'd recommend taking a look at the suggestions on this post to help with mail delivery issues. Hope this helps.