I am talking with Matthew Clemente about “send.Better() – Giving ColdFusion Email a REST” in this episode of CF Alive Podcast.
Your application sends emails; they might be alerts, confirmations, reports, surveys, newsletters, support-related, or invoices. The process of setting up, maintaining, and troubleshooting these emails generally alternates between boring and frustrating; developers are happy to move on to richer, more modern portions of their applications.
It really doesn't have to be like this. AWS SES might be the best known of the transactional email services, but that doesn't mean it's the best. Mailgun, Sendgrid, Postmark, and Sparkpost all provide compelling email-as-a-service offerings, built around developer-focused REST APIs.
The offerings and features varying slightly from one provider to the next; which is the best for you? As usual, the answer is that it depends, but I'll help you find out. We're going to cover:
- The benefits provided by using a transactional email service
- A pragmatic, use-driven comparison of the major players in the space
- Pitfalls, considerations, and tips when configuring your DNS records and integrating a transactional email service with your application
- Interacting with the actual APIs, and showing how easy they are to use with ColdFusion
So let's dive in and see easy it is to send better emails, get detailed reporting, access logging that doesn't make you want to pull your hair out, and take advantage of advanced features, such as webhooks, transactional templates, and inbound email rules.
Contents
- Show notes
- But isn’t email dead?
- Email as in interface for your application (it’s neglected)
- Why emails on Dev servers matter and how to do them right
- Send Plain text and HTML emails
- Why transactional email services?
- Which email services do you like?
- Who NOT to use and why?
- How to set a transactional email service
- Using Web hooks in email processing
- The future of ColdFusion email
- Why are you proud to use CF?
- WWIT for you to make CF more alive this year?
- What are you looking forward to at CF Summit?
- Mentioned in the episode:
- Listen to the Audio
- Bio
- Links
- Interview Transcript
Show notes
But isn’t email dead?
- Open, accessible, resilient
- Slack, messaging
Email as in interface for your application (it’s neglected)
Transactional emails
- Use cases
- Purchase confirm
- Mini surveys with links for options
- Account creation
- Email verification
- Password reset
- Receipts
- Requested updates
- Comment notifications
- Weekly digests or report
- Where Speed and deliverability matter
CFMAIL + SMTP settings
- TLS on encrypted send
- Set in your Application.cfc rather than hardcoding in each CFMAIL tag
- Dev → stage → live
- Mailtrap.io ← fake smtp server for mocking
Why emails on Dev servers matter and how to do them right
Send Plain text and HTML emails
Why transactional email services?
- Separate from your marketing and other emails → better deliverability and speed
- Lots more data on your emails is available
Which email services do you like?
- Which is best (trick question, they all have specific use cases that make sense)
- AWS SES – low cost, less features, harder to set up $5/50k emails
- Postmark – pure transactional emails, highest deliverability, speed, great features, more expensive $50/50k emails
- Spartpost – developer friendly, free tier to 10k/mo, more marketing focused $9/50k emails
- Sendgrid – does both transactional and marketing emails $20/50k emails
- mailGun – developer friendly, free tier to 15k/mo, detailed developer features and logging, good inbound email handling, $20/50k emails
Who NOT to use and why?
- MailChimp
- GetResponse
- ConstantContact
Deliverability
- SPF
- DKIM
- DMARC
- Dmarc.postmarkapp.com – friendly reporting
- How to test your deliverability (Mail-tester.com)
How to set a transactional email service
- Use a subdomain for config but can send from your main domain
- REST API or SMTP
- Start with SMTP
- If you need more features move to REST
- Also faster
- CFML wrappers exist for these
Using Web hooks in email processing
- Inbound
- Bounce processing
- Link processing and verification
- Email open processing
- Zapier integration
The future of ColdFusion email
Why are you proud to use CF?
- Easy to create
- Community that helps out esp slack channel
WWIT for you to make CF more alive this year?
- CF slack channel
- CF Alive podcast
- Help with Github projects
- Forgebox
- Go to CF conferences
- Blog about CF and problems you have solved and successes you have had
What are you looking forward to at CF Summit?
Mentioned in the episode:
- Mailtrap.io ← fake smtp server for mocking
- Mail-tester.com
- https://senderscore.org/
- CF slack channel
- Matthew’s slide from CFSummit 2017
Listen to the Audio
Bio
Matthew Clemente
I'm a Founding Partner with Season 4, LLC, a team of designers, programmers, and writers working in the legal industry. After studying English, I took the road less traveled and one day realized, much to my surprise, that I had become a developer. I've been building with ColdFusion since MX 7, and the community has been amazing from the start.
I'm a husband, father, and always trying to be better..
Links
You can find me on Twitter (@mjclemente84), Github (@mjclemente) and I blog, time permitting, at the cleverly named blog.mattclemente.com
Interview Transcript
Michael: Welcome back to the show. Today we're gonna be looking at how you can send data giving ColdFusion email a rest and there is a pun intended there with Matthew Clemente. And we're gonna look at why is an e-mail dead already? But it really isn't and how you can use e-mail as an interface for your application. And we’ll look at some CF mail settings you may not been using. But then we're going to look at some transactional mail services that are really exciting that can give you high performance and better deliverability than you may be used to. And speaking of deliverability, you may wanna check out your own e-mails deliverability however you're sending e-mail, and we'll have some tips on that. So welcome Matthew.
Matthew: Thank you, happy to be here.
Michael: And do you wanna go by Matthew or Matt? I noticed your blog has Matt in it, but like you put Matthew in the…
Matthew: The blog is Matt because someone else got Matthew.
Read more
Michaela Light is the host of the CF Alive Podcast and has interviewed more than 100 ColdFusion experts. In each interview, she asks "What Would It Take to make CF more alive this year?" The answers still inspire her to continue to write and interview new speakers.
Michaela has been programming in ColdFusion for more than 20 years. She founded TeraTech in 1989. The company specializes in ColdFusion application development, security and optimization. She has also founded the CFUnited Conference and runs the annual State of the CF Union Survey.
And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.
Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.
What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.
And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.
You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.
All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.
Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.
No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next
ColdFusion Alive Best Practices Checklist
Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.
√ Easily create a consistent server architecture across development, testing, and production
√ A modern test environment to prevent bugs from spreading
√ Automated continuous integration tools that work well with CF
√ A portable development environment baked into your codebase… for free!
Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.