Alba HK

My email gotcha

tldr; – If Postmark emails are not sending on a new server, make sure curl is installed & active. If this little post spares someone else the 30 minutes of stress I went through trying to figure this out then I am happy.

This morning I discovered enquiry emails from our website were not getting through to recipients. As a property listing website this is bread and butter stuff that cannot be broken. First thing I did was walk through the email sending process to track down where the problem might be.

We use Postmark for sending transactional emails and its fantastic. From our development server we’ve had zero issues sending through the Postmark API (making use of the also-fantastic Codeigniter Postmark Library)

The Postmark API was never receiving the api request from our server backend so a bit of digging reveals a curl call within php that wasn’t getting run. A quick check of a phpinfo(); page showed me the live server did not have a curl module installed. Fingers crossed its as simple as this.

A helpful blog post on how to install curl for php on ubuntu and I was on my way again. Let the emails (re)commence.

Leave a Reply

Your email address will not be published. Required fields are marked *