Support Unlimited Forwarded Email Messages via API (and ColdFusion)

We have clients that use dedicated email addresses to receive and process messages and attachments. I had previously developed some functions to bulk download EML files directly from a mail server's file system (using FastCopy) and then use "javax.mail" and a lot of crazy logic to unwrap attachments within attachments to extract files for processing. (Most file attachments were being sent from different versions of a required iPhone app on different devices and the methods of attaching files was not consistent.) Hit me up if anyone's interested in extracting attachments from EML files. While researching alternative solutions, we came across Forward Email. They offer a free tier that supports unlimited domains and email forwarding with webhook support. Webhook? Wha? Really? AMAZING! When configuring a domain on the free tier for a webhook, you're required to add a special TXT "forward-email" DNS record in order to configure the endpoint. They have an option to encrypt the value so that it's not exposed to third-parties. If you want to configure it using their service (without the need to add it to DNS), you'll need a $3/mo "Enhanced" plan that also unlocks developer API access (to manage domains & aliases.) After configuring this service, we opted to set up a Taffy API endpoint to accept emails-as-JSON and save them to the local file system. Based on our experience working with SendGrid webhooks, we save the JSON payload directly to the local file system without being dependent on a database connection. This approach has been beneficial as a client recently encountered database issues and it had zero negative impact on the API webhook's ability to store incoming data. Source Code To access to the source code for the Taffy API endpoint, check out the post on the new MyCFML website.

May 9, 2025 - 03:17
 0
Support Unlimited Forwarded Email Messages via API (and ColdFusion)

We have clients that use dedicated email addresses to receive and process messages and attachments. I had previously developed some functions to bulk download EML files directly from a mail server's file system (using FastCopy) and then use "javax.mail" and a lot of crazy logic to unwrap attachments within attachments to extract files for processing. (Most file attachments were being sent from different versions of a required iPhone app on different devices and the methods of attaching files was not consistent.) Hit me up if anyone's interested in extracting attachments from EML files.

While researching alternative solutions, we came across Forward Email. They offer a free tier that supports unlimited domains and email forwarding with webhook support. Webhook? Wha? Really? AMAZING!

When configuring a domain on the free tier for a webhook, you're required to add a special TXT "forward-email" DNS record in order to configure the endpoint. They have an option to encrypt the value so that it's not exposed to third-parties. If you want to configure it using their service (without the need to add it to DNS), you'll need a $3/mo "Enhanced" plan that also unlocks developer API access (to manage domains & aliases.)

After configuring this service, we opted to set up a Taffy API endpoint to accept emails-as-JSON and save them to the local file system. Based on our experience working with SendGrid webhooks, we save the JSON payload directly to the local file system without being dependent on a database connection. This approach has been beneficial as a client recently encountered database issues and it had zero negative impact on the API webhook's ability to store incoming data.

Source Code

To access to the source code for the Taffy API endpoint, check out the post on the new MyCFML website.