Search code examples
phpemailcpanel

Email from GoDaddy is showing with 'via' in Gmail


I have a PHP site hosted on GoDaddy, when I send an email from the site with an email on the same domain, it comes through to my gmail inbox, however the from field shows the from address I selected as well as the actual domain which it says is {id}.prod.secureserver.net

I have set up the email address that I want to use in cPanel, my understanding is that if I did this then when I send the email with PHP GoDaddy would send the email directly from my domain email. However, it shows as coming via secureserver.net


Solution

  • I have solved this. You have to send using credentials, not just pipe to SMTP. Create a mail account on cPanel that matches the "From" address you want to use. Save the full email address and password. Then in your PHP application, set the SMTP server to the one given in the cPanel email setup (it is NOT mail-relay.secureserver.net or anything like that - it will be yourdomain.com or subdomain.yourdomain.com if you've set this up on a subdomain - this is critical because secureserver.net will not respond on port 465 but your domain will).

    The port is 465, the protocol is SMTPS (not STARTTLS), and the from address and username are the email address you created (obviously use the same password - the authentication is login or plain). I just set this up in our Wordpress installation on GoDaddy and now I pass SPF and my emails no longer show "via secureserver.net".