Skip to main content
You can use an external SMTP server to send email from your hosting.com account. This is common if you send through a dedicated email provider such as Mailgun, SendGrid, Mailchimp or Amazon SES, rather than through the hosting server.
This used to depend on which server your account was on. It no longer does — external SMTP works across hosting.com servers.

Setting it up

Your email provider will give you a hostname, a port and a set of credentials. Where you enter them depends on what is sending the mail:
  • A WordPress site — use an SMTP plugin, and enter the provider’s details there rather than relying on the PHP mail() function
  • Another application or CMS — look for its SMTP or mail transport settings
  • Your own code — point your mail library at the provider’s host and port
Use the submission port your provider specifies, usually 587 with STARTTLS or 465 with implicit TLS. Port 25 is not the right choice for authenticated sending and is widely blocked by consumer ISPs.
Sending through an external provider only works if your DNS authorises it. Add the provider’s SPF include and DKIM records to your domain, or mail you send will be rejected or filtered as spam. Your provider publishes the exact records to use. See Managing e-mail deliverability settings.

When an HTTP API is the better option

Most email providers offer an HTTP API as well as SMTP, and it is often the more reliable choice. An API call does not depend on outbound SMTP ports being open, gives clearer error messages when a send fails, and usually reports delivery status back to you. API-based mail plugins are available for the popular content management systems from providers including Mailchimp, SendGrid and Mailgun. You can also call these APIs directly from your own code — see Using the Mailchimp API with PHP for a worked example.