Improved Email Functionality in CFMX 6.1

In case you haven’t heard, one of the coolest new features of Macromedia ColdFusion MX 6.1 is the new email functionality. First and foremost, performance has been greatly improved through the use of multithreading and connection pooling. Using multiple threads to send email means that ColdFusion can send multiple messages simultaneously rather than one at a time, and connection pooling means that ColdFusion will reuse connections between it and the mail server rather than making new connections each time it wants to send an email. Creating connections is a relatively time consuming process, so the more you can reuse existing connections, the more efficient the server is being. These two improvements mean that ColdFusion MX 6.1 is capable of sending more than 1,000,000 emails an hour!

I don’t need to send 1,000,000 emails an hour, so although I’m glad I have that capability should I ever need it, I’m actually more excited about support for multipart mail messages and the new CFMAILPART tag. There are typically two types of email that people send: text and HTML. If you don’t know what kind of email client your recipients are using, or whether they prefer text or HTML email, it used to be that you pretty much had to stick with text emails just to be on the safe side. That meant that even though most people use email clients which are fine with HTML email, and although ColdFusion supported the sending of HTML email, you would generally have to cater to the lowest common denominator and send everyone text email. Now, thanks to the CFMAILPART tag, you don’t have to compromise anymore. When you send a multipart email message, you are actually sending both a text and an HTML version which means it is up to the email client to determine which part of the email message to display to the user. That means you can send one email out to your whole user base, and make sure everyone gets the best experience their email client is configured to deliver.

So now that CFMX 6.1 can send multipart email messages, what about being able to parse multipart email messages, as well? CFPOP now supports the ability to separately retrieve either the HTML or the text portions of a multipart email message through the new textBody and htmlBody properties. The body property is still there, so existing code won’t break, but now you clearly have more options.

Another important addition to the CFMAIL tag is the ability to specify a username and password for authenticating against password protected mail servers. More and more SMTP servers are being secured in order to prevent unauthorized relaying of email messages by spammers. Now, ColdFusion gives you a way to interact with secured mail servers.

To learn more about the improved email functionality of CFMX 6.1, check out Ben Forta’s new Breeze Presentation. To learn more about ColdFusion MX 6.1 in general, check out the CFMX 6.1 release notes.

3 Responses to Improved Email Functionality in CFMX 6.1

  1. Quite frankly, I have seen any performance improvement in with the new email functionality in ColdFusion MX 6.1.The setup I have right now serves my purpose well — I have a newsletter of about 300,000 subscribers and it’s not a problem to get the mailing out withing 2 hours (3 max).

  2. ssmm says: