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
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.Related articles
- Email sending limits — mail sent through an external provider does not count towards your hosting account’s limit
- Managing e-mail deliverability settings
- Introduction to e-mail protocols
- Preventing outgoing e-mail from being marked as spam
- Using the Mailchimp API with PHP
.jpg?fit=max&auto=format&n=E2LlsT5gBITvo732&q=85&s=ec11e1673894bdf46663a5d73602eb87)