Sending Email with Postmark
With the new Members app it’s likely that you’ll be using Perch to send more outgoing email than you were before, be that signup emails, password reminders or admin notifications. In the case of emails that go to your site members, it’s particularly important that these get through – if they don’t, you’ll have unhappy customers and lots of customer support to cope with.
We know from experience helping Perch customers that sending email through your web hosting account can be patchy. One way around that is to use a dedicated email sending service. You will have heard of services like CampaignMonitor and MailChimp for sending marketing emails to a list of customers, but distinct from those there are also services like Postmark for sending individual ‘tranactional’ emails to one customer at a time. These are emails like notifications or receipts – the sort of emails that result from a customer performing an action on your site.
You can configure Perch to use Postmark via its SMTP interface. Once you’ve set up a Postmark account, got to your Postmark rack and enable SMTP access and configure a sender signature to match the details in your Perch
config.php file. Then add the following to your Perch config:
define('PERCH_EMAIL_METHOD', 'smtp'); define('PERCH_EMAIL_HOST', 'smtp.postmarkapp.com'); define('PERCH_EMAIL_AUTH', true); define('PERCH_EMAIL_PORT', 25); define('PERCH_EMAIL_USERNAME', 'your-api-key'); define('PERCH_EMAIL_PASSWORD', 'your-api-key');
Your emails will then send via Postmark rather than your web server.