Using Fastmail with CodeIgniter
Using Fastmail with CodeIgniter
Details
I recently switched a client’s site from using it’s own Postfix mail system to using Fastmail. More on the reasons for this below, but this is just a quick note on what I need to do to get this running. The Fastmail pages are rather short on the settings needed to communicate from a web application, in this case a CodeIgniter based application.
This is what I have in my app/config/email.php
file:
1 | $config['protocol'] = 'smtp'; |
Plus remember to open up the port 465 inbound/outbound on the firewall, if there is one.
Reasons
The website is hosted on Digital Ocean, an excellent hosting company that has run my websites for a number of years, without problems. Except for one little shortcoming… because of their business model (rapid and easy setup of websites and containers) they become a haven for spammers and scammers and that means an increasing number of ISPs simply block all Digital Ocean IP numbers. So there needs to be an external SMTP handler at least, or in this case, just pass the whole thing off to Fastmail. Why Fastmail? I suggested a few others to the client but they are not happy about Google or Microsoft, and Fastmail seemed competent and competitive without the baggage of the larger companies. It was also my recommendation!