PHP on Godaddy Linux Shared Trying to Send Through Gmail Smtp

PHP on GoDaddy Linux Shared trying to send through GMAIL SMTP

As discussed previously, GoDaddy has been known to block outgoing SSL SMTP connections in favor of forcing you to use their own outgoing mail server.

This is pretty much the tip of the iceberg, with regard to the immense suckitude of GoDaddy as a company, registrar and web host. Ditch'em.

How to send email from GoDaddy Linux VPS with gmail SMTP so that sent emails are saved

The problem is that Godaddy (and many other VPS providers) block SMTP ports in order to fight spammers.

When you are using $mail->IsMail(), the e-mails will go via GoDaddy's servers completely bypassing your Gmail account.

Now there is another problem as well, Google protects your @gmail.com addresses using various methods (such as SPF), so even if you are able to send the e-mail, it will be most likely marked as SPAM - if delivered at all. Otherwise anyone could send e-mails as you..

I'd highly suggest purchasing a domain (if you dont have one already) and either:

  1. Hosting it in GoDaddys e-mail service and sending it via their SMTP servers (their SMTP servers are allowed)
  2. Use external service which does not rely on SMTP (such as MailGun and their PHP SDK for example, but do your own research for a suitable one)

There might be some other "hacky" ways to still send these e-mails trough Gmail if you really need to, such as using VPN inside VPS or[1] proxying google SMTP externally on some other port which is not blocked. Beware, these methods still require some external service (most likely paid) and might conflict with GoDaddy's and/or Gmail TOS


[1] Apparently most of the VPN providers also block SMTP ports to avoid e-mail spammer flood

PHPMailer GoDaddy Server SMTP Connection Refused

As it seems this is a continuing problem, let me add my own experience.

Our website uses PHPMailer and the site is hosted on a GoDaddy linux server. The settings that seemed to be correct (according to everything I could find on SO and the goDaddy support site) were as follows:

SMTP_SERVER: smtpout.secureserver.net (or alternatively relay-hosting.secureserver.net)
SMTP_PORT: 465 //or 3535 or 80 or 25
SMTP_AUTH: true //always
SMTP_Secure: 'ssl' //only if using port 465

After spending 6+ hours trying every variation of ports(25, 3535, 4655), servers relay-hosting.secureserver.net,smtpout.secureserver.net:[port], etc.), usernames, passwords,etc. I called goDaddy. Another 40 minutes later, it was revealed that:

1) the "workspace" email accounts are being retired. That's important because if you have an email account with goDaddy today, you likely have a Workspace account. This is, according to the tech support rep, hosted separately from you linux account.

2) goDaddy is moving toward cPanel email accounts. Hurray! Time table? "...in the next 2 to 3 years!"

3) I moved our accounts from Workspace to cPanel accounts while I was on the phone with the rep. Really easy to do.

4) After you change your email accounts (including editing your MX records) to a cPanel email (vs. a "workspace" email) the appropriate settings for a web-form email using PHPMailer are:

SMTP_SERVER: localhost   //(and I mean literally: "localhost"- in place of smtp.secureserver.net and relay-hosting.secureserver.net, etc.)

... and everything else (as above) the same...

The webform I built with PHPMailer worked perfectly after this change!

Use your cPaneL email account login (username) and password in the PHPMailer setup and your web emails will work seamlessly!

An added bonus is that webmail (does anybody use this anymore?) can be accessed at [yourdoman]\webmail. No more cryptic url's to remember! And the accounts cand be IMAP or POP!

Admittedly, this means you must use goDaddy's cPanel email accounts, but getting the webform to work flawslessly with PHPMailer was the real reward!

Unable to send mail using PHP using Godaddy email credentials

Please install "Net/" classes.

Use this command on Linux machine,sudo pear install Net_SMTP OR

pear install Net_SMTP for windows machine. OR

downloaded the following, and put them in /Net

http://pear.php.net/package/Net_SMTP/download

http://pear.php.net/package/Net_Socket/download



Related Topics



Leave a reply



Submit