Outbound email Sendgrid (on Godaddy Shared Hosting)

I set up a Sendgrid account and when I try and setup an outbound SMTP account I keep getting “SMTP Connect Failed”

3: Connection: opening to smtp.sendgrid.net:465, timeout=300, options=array (
3: Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.sendgrid.net:465 (Connection refused) [/home/s9wfk5ticxce/public_html/include/phpmailer/class.smtp.php line 298]
1: SMTP ERROR: Failed to connect to server: Connection refused (111)
3: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

So I have a different installation (it happens to be a different SuiteCRM version too) on a VPS and it connects and sends with the same Sendgrid credentials no problems.

I can use Godaddy’s secureserver.net to send SMTP no problem on both servers. (including the Shared Hosting one)

However, on the shared hosting server I just can’t get any kind of SMTP connection to work except for Godaddy’s secureserver.

I’ve been reading that Godaddy blocks 465,995, 463 etc. for php mail except for their own servers. I’ve never really run into this before and use all kinds of different outbound SMTP servers on Godaddy shared hosting with Wordpress without a problem.

Does anyone have Sendgrid or gmail for that matter working as an outbound email on Godaddy Shared hosting? If so, any tips?

Is this giving an error in the “test send email” feature, inside email account config? If so, it should give you a dialog box with a link to “show full SMTP log” - what’s inside that?

If it doesn’t give you that, I suggest uncommenting these lines and getting the result from the suitecrm.log:


Thanks @pgr tried that, all it says in the log is:

Tue Sep 24 09:32:27 2019 [1282041][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed.

I’ve tried every combination of SSL/TLS and None and with every port number. The same credentials work on VPS hosted SuiteCRM but not shared hosted. I’m thinking its a Godaddy thing. There’s lots of posts on the web about Godaddy blocking outbound SMTP ports except to their mail servers. I’m going to call this morning and see if I can confirm. I 'll post results or solution if there is one.

This really stinks, because using Godaddy’s servers for outbound email means you go straight to the spam folder.

I find it strange that there’s nothing else in the logs… maybe it’s because the messages are “debug” level and your log is at a higher level?

In those uncommented lines, perhaps the easiest thing is to change those two logging commands from “debug” to “fatal”, this way it will surely get to the logs.

Any way I agree with your evaluation that this is probably some issue on the side of GoDaddy, but at least you will have better information to use when talking to their support.

OK so I’ve found out you cannot route mail through an external SMTP server on any of Godaddy’s hosting plans. They only allow routing through their own servers. So you have to set up a CPANEL email account and send through there. This is problematic because you can’t do all the domain validations required and it usually ends up in spam. Long story short, if you plan on sending emails through Gmail, Gsuite, Office 365 or Mailgun, Sendgrid, etc. You need to be on VPS hosting at a minimum.

Grr. that really stinks. For small clients with one or two users shared hosting is cheap and works (except for this issue).

Goddady’s restrictions don’t make much sense to me. The same thing that worries you (email going into spam) is what should worry them (their mail servers’ reputations going down)…

I’m sure there are less paranoid shared hosting options out there. Try to find a smaller one, though not too small, and one that has good references as an up-and-coming successful hosting company.

I believe hostgator should be good - i have a few client on a shared hosting plan and SuiteCRM with mailgun smtp setup with success.