|By Ben Forta||
|September 11, 2003 12:00 AM EDT||
One of the most used tags in CFML is <CFMAIL>. It is definitely the most used of all the Internet protocol tags, and as one of the original CFML tags (it was actually one of the DBML tags and originally named <DBMAIL>), it has also been slowly enhanced and updated with each new release of ColdFusion. Slowly. Maybe a little too slowly.
ColdFusion MX 6.1 introduces a whole new <CFMAIL>, a much better and much more powerful <CFMAIL>, and this month I'd like to walk you through these important changes.
Let's start with performance. <CFMAIL> was never designed to be a high-performance mass mailer, and yet many developers have tried using it as just that. <CFMAIL> has always been very capable of delivering hundreds, even thousands, of messages, but that's about as far as the tag could be pushed.
ColdFusion MX 6.1 introduces important changes to the <CFMAIL> engine that facilitate dramatically increased mail-delivery performance. In fact, in testing, we clocked <CFMAIL> on a fairly typical box delivering mail at over 1,000,000 messages an hour (so fast that the bottleneck became the network and mail server rather than ColdFusion).
So what changed? Two things:
<CFMAIL> performance has been improved in all versions of ColdFusion, but if you need high-volume mail delivery, then you should be using ColdFusion MX Enterprise. The two changes just described apply to ColdFusion MX Enterprise only.
One frequently requested <CFMAIL> enhancement is support for backup SMTP servers so that if a mail server is down, a backup SMTP server would be used. Support for redundant (backup) SMTP servers has been added to ColdFusion MX 6.1 Enterprise (this too is an Enterprise-only feature).
ColdFusion Administrator contains a new field (in the Mail page) named "Backup mail servers". You may specify as many servers as you like here (DNS names or IP addresses) in a comma-delimited format (you may also list backup servers right in the <CFMAIL> tag SERVER attribute). The specified servers are the backup servers, and will be used automatically if the primary SMTP server is unavailable.
It is important to note that <CFMAIL> does not support multiple mail server delivery. These additional servers are backup servers and are used only if the primary server is unavailable. If a server (any server) is unavailable, then ColdFusion will attempt to use the next server in the list. Once a server has been flagged as unavailable, ColdFusion will not attempt to use it again for 60 seconds. If all servers are unavailable, then an error is logged.
Like the high-performance features discussed above, the ability to specify backup SMTP servers is an Enterprise-only feature. (From this point on, however, everything discussed applies to all versions of ColdFusion, including ColdFusion MX Standard).
SMTP was never designed to a be a secure protocol. As we are all painfully aware, you can never really be sure who mail comes from and whether or not a FROM field contains the actual sender address. It's all too easy to submit fake SMTP e-mail to mail servers for processing.
In recent years, mail administrators have started taking steps to prevent their servers from being used to deliver unauthorized mail (commonly known as relaying). One technique that has gained popularity is to require an SMTP login. Unlike POP, which always requires a login, SMTP usually does not, but many SMTP servers now do require that login credentials be passed in in order to deliver outbound mail. If enabled, this security prevented the use of <CFMAIL>, as <CFMAIL> provided no way to specify login information.
ColdFusion MX 6.1 supports SMTP logins in two ways:
The ability to use SMTP logins is an important enhancement, and one that will make many server administrators very happy.
Multiple MIME Types
One of the most eagerly anticipated <CFMAIL> enhancements is the ability to include multiple bodies of different MIME types all in a single message. What does this mean? Consider the following:
You deliver reports via <CFMAIL>. Your reports are detailed, have columns, colors and fonts, use images, and more, and so you tell <CFMAIL> to deliver the e-mail in HTML, as most mail clients, including Outlook and Outlook Express, support HTML e-mail. The problem, however, is that not all users have mail clients capable of displaying HTML e-mail, so you also need to generate a plain-text version of your report for those users. Of course, this then requires that you maintain a record of which version to send to which user (probably a flag in your database). You'd need a way for users to specify the message type they'd like, and then mail generation code that might look a bit like this:
<!--- Check HTML mail flag --->
<!--- Send HTML version --->
<!--- Send text version --->
You'd need to repeat everything, not to mention maintaining the user mail preferences. You'd also not be able to use the <CFMAIL> query attribute easily, or you'd need two queries - one for text message recipients and one for HTML message recipients - and then you'd need two <CFMAIL> tags (one for each query).
There's a better way to do this. E-mail messages can actually contain multiple bodies, each of a different MIME type. The problem is that <CFMAIL> did not support the use of this feature. Until now, that is. Here's the ColdFusion MX 6.1 version of the previous example:
<!--- Generate mail message --->
<!--- Generate text body --->
Text body goes here
<!--- Generate HTML body --->
<B>HTML body goes here</B>
As you can see, a single <CFMAIL> tag is being used along with two instances of a new tag named <CFMAILPART>. This new tag allows you to embed multiple bodies in a single message, as long as each has a different MIME type. This way it is the mail client that decides which body to display, and this makes your life a bit simpler. (It also means that your mail messages will be bigger; you'll need to decide whether or not this is acceptable.)
Any and all MIME types are supported, although in practice you'll probably use only TEXT and HTML.
Note: Although we're just covering <CFMAIL> in this column, it's worth noting that <CFPOP> has been similarly enhanced and now supports the retrieval of multiple bodies as well.
In addition to all the changes listed thus far, <CFMAIL> also features lots of little enhancements. Some worth noting are:
<CFMAIL> is an important ColdFusion tag and ranks as one of the most used tags in the CFML language. For high performance and high-availability mail delivery you should definitely consider using ColdFusion MX Enterprise. For all users, the enhancements to this tag in ColdFusion MX 6.1 provide yet another compelling reason to upgrade.
On a totally separate note, this is my 50th CFDJ <BF> on <CF> column - that's 50 back-to-back columns (with only one exception, and I'll try not to let that happen again). While writing this column, I glanced at the topics covered since way back when, and was reminded of just how far ColdFusion has come in such a short time. It's been a great ride thus far, here's to another 50!
|ant 10/09/03 12:10:35 PM EDT|
While much of the new cfmail functionality is great, it comes at a price - The inability to write a text file into email directly from a database or other source. All I had to do was create a boundary and header and add that text in between my cfmail call like so:
After the "upgrade" only cfmailparam worked - back to cfdirectory/cffile calls - more overhead and unnecesary code. The new cfmailpart doesn't allow for attachements like this - ONLY inline content. Oh well, 2 steps forward, one step back...
|Craig Overpeck 09/24/03 12:51:24 PM EDT|
It cut our hardware scaling solution in half. BF is right - a long awaited but noteworthy accomplishment by Alliare...I mean Macromedia. Congrats on number 50 BF!
|prethi 09/24/03 08:33:59 AM EDT|
can i have a sample of cfmail. I have hosted with cfmresources but am not able to send mails.
|Fran Garland 09/24/03 08:31:25 AM EDT|
Yes CFMail has come a long way.
I intend to use some of this new functionalily on my companies web site.
In addition it give me more fodder to upgrade the one server not on the CFMX 6.0 En since the setting staying connected in only available in this version. Enjoyed the article
Recent technology advances in miniaturization has positioned the wearables as the pinnacle of technology convergence with the human body. We inquire if wearables are mere standard miniaturized devices extended with the connectivity and present our views on considerations like design, applications, performance, efficiency, interoperability, usage scenarios, human device interaction and consequent trade-offs enabling wearables to impart optimal value.
Apr. 21, 2015 09:15 PM EDT Reads: 545
In this session we look at creating interactive communications via the web by adding messaging, file transfer, and group communication (group chat and audio/video conferencing) into the web experience. We will also discuss potential applications of this technology in areas including B2B, B2C, P2P, and gaming. Peter is Technical Director at Acision. He graduated from The University of Edinburgh in 2000 with a BSc (Hons) in Computer Science. After graduation Peter worked on a PSTN switch developing signalling stacks for SS7, ISDN and similar protocols and creating advanced routing and serv...
Apr. 21, 2015 08:30 PM EDT Reads: 700
So I guess we’ve officially entered a new era of lean and mean. I say this with the announcement of Ubuntu Snappy Core, “designed for lightweight cloud container hosts running Docker and for smart devices,” according to Canonical. “Snappy Ubuntu Core is the smallest Ubuntu available, designed for security and efficiency in devices or on the cloud.” This first version of Snappy Ubuntu Core features secure app containment and Docker 1.6 (1.5 in main release), is available on public clouds, and for ARM and x86 devices on several IoT boards. It’s a Trend! This announcement comes just as...
Apr. 21, 2015 08:00 PM EDT Reads: 604
SYS-CON Events announced today the IoT Bootcamp – Jumpstart Your IoT Strategy, being held June 9–10, 2015, in conjunction with 16th Cloud Expo and Internet of @ThingsExpo at the Javits Center in New York City. This is your chance to jumpstart your IoT strategy. Combined with real-world scenarios and use cases, the IoT Bootcamp is not just based on presentations but includes hands-on demos and walkthroughs. We will introduce you to a variety of Do-It-Yourself IoT platforms including Arduino, Raspberry Pi, BeagleBone, Spark and Intel Edison. You will also get an overview of cloud technologies s...
Apr. 21, 2015 03:00 PM EDT Reads: 2,757
Health care systems across the globe are under enormous strain, as facilities reach capacity and costs continue to rise. M2M and the Internet of Things have the potential to transform the industry through connected health solutions that can make care more efficient while reducing costs. In fact, Vodafone's annual M2M Barometer Report forecasts M2M applications rising to 57 percent in health care and life sciences by 2016. Lively is one of Vodafone's health care partners, whose solutions enable older adults to live independent lives while staying connected to loved ones. M2M will continue to gr...
Apr. 21, 2015 03:00 PM EDT Reads: 1,222
SYS-CON Events announced today that Vicom Computer Services, Inc., a provider of technology and service solutions, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. They are located at booth #427. Vicom Computer Services, Inc. is a progressive leader in the technology industry for over 30 years. Headquartered in the NY Metropolitan area. Vicom provides products and services based on today’s requirements around Unified Networks, Cloud Computing strategies, Virtualization around Software defined Data Ce...
Apr. 21, 2015 02:00 PM EDT Reads: 1,546
Dave will share his insights on how Internet of Things for Enterprises are transforming and making more productive and efficient operations and maintenance (O&M) procedures in the cleantech industry and beyond. Speaker Bio: Dave Landa is chief operating officer of Cybozu Corp (kintone US). Based in the San Francisco Bay Area, Dave has been on the forefront of the Cloud revolution driving strategic business development on the executive teams of multiple leading Software as a Services (SaaS) application providers dating back to 2004. Cybozu's kintone.com is a leading global BYOA (Build Your O...
Apr. 21, 2015 02:00 PM EDT Reads: 1,239
“In the past year we've seen a lot of stabilization of WebRTC. You can now use it in production with a far greater degree of certainty. A lot of the real developments in the past year have been in things like the data channel, which will enable a whole new type of application," explained Peter Dunkley, Technical Director at Acision, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
Apr. 21, 2015 12:00 PM EDT Reads: 4,028
What exactly is a cognitive application? In her session at 16th Cloud Expo, Ashley Hathaway, Product Manager at IBM Watson, will look at the services being offered by the IBM Watson Developer Cloud and what that means for developers and Big Data. She'll explore how IBM Watson and its partnerships will continue to grow and help define what it means to be a cognitive service, as well as take a look at the offerings on Bluemix. She will also check out how Watson and the Alchemy API team up to offer disruptive APIs to developers.
Apr. 21, 2015 12:00 PM EDT Reads: 1,647
The IoT Bootcamp is coming to Cloud Expo | @ThingsExpo on June 9-10 at the Javits Center in New York. Instructor. Registration is now available at http://iotbootcamp.sys-con.com/ Instructor Janakiram MSV previously taught the famously successful Multi-Cloud Bootcamp at Cloud Expo | @ThingsExpo in November in Santa Clara. Now he is expanding the focus to Janakiram is the founder and CTO of Get Cloud Ready Consulting, a niche Cloud Migration and Cloud Operations firm that recently got acquired by Aditi Technologies. He is a Microsoft Regional Director for Hyderabad, India, and one of the f...
Apr. 21, 2015 12:00 PM EDT Reads: 1,406
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
Apr. 21, 2015 12:00 PM EDT Reads: 2,196
In 2015, 4.9 billion connected "things" will be in use. By 2020, Gartner forecasts this amount to be 25 billion, a 410 percent increase in just five years. How will businesses handle this rapid growth of data? Hadoop will continue to improve its technology to meet business demands, by enabling businesses to access/analyze data in real time, when and where they need it. Cloudera's Chief Technologist, Eli Collins, will discuss how Big Data is keeping up with today's data demands and how in the future, data and analytics will be pervasive, embedded into every workflow, application and infra...
Apr. 21, 2015 11:00 AM EDT Reads: 1,115
The best mobile applications are augmented by dedicated servers, the Internet and Cloud services. Mobile developers should focus on one thing: writing the next socially disruptive viral app. Thanks to the cloud, they can focus on the overall solution, not the underlying plumbing. From iOS to Android and Windows, developers can leverage cloud services to create a common cross-platform backend to persist user settings, app data, broadcast notifications, run jobs, etc. This session provides a high level technical overview of many cloud services available to mobile app developers, includi...
Apr. 21, 2015 11:00 AM EDT Reads: 883
SYS-CON Media announced today that @WebRTCSummit Blog, the largest WebRTC resource in the world, has been launched. @WebRTCSummit Blog offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. @WebRTCSummit Blog can be bookmarked ▸ Here @WebRTCSummit conference site can be bookmarked ▸ Here
Apr. 21, 2015 10:00 AM EDT Reads: 2,271
SYS-CON Events announced today that Ciqada will exhibit at SYS-CON's @ThingsExpo, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Ciqada™ makes it easy to connect your products to the Internet. By integrating key components - hardware, servers, dashboards, and mobile apps - into an easy-to-use, configurable system, your products can quickly and securely join the internet of things. With remote monitoring, control, and alert messaging capability, you will meet your customers' needs of tomorrow - today! Ciqada. Let your products take flight. For more inform...
Apr. 21, 2015 10:00 AM EDT Reads: 1,740
Can call centers hang up the phones for good? Intuitive Solutions did. WebRTC enabled this contact center provider to eliminate antiquated telephony and desktop phone infrastructure with a pure web-based solution, allowing them to expand beyond brick-and-mortar confines to a home-based agent model. It also ensured scalability and better service for customers, including MUY! Companies, one of the country's largest franchise restaurant companies with 232 Pizza Hut locations. This is one example of WebRTC adoption today, but the potential is limitless when powered by IoT.
Apr. 21, 2015 09:00 AM EDT Reads: 5,107
GENBAND introduced its Real Time Communications (RTC) Client for Lync* to seamlessly combine real-time communications with Lync Instant Messaging (IM) and Presence. “We’re shaking up the economics of delivering Unified Communications (UC) and offering a compelling way to integrate previously bespoke communications technologies,” said Carl Baptiste, GENBAND’s Senior Vice President, Enterprise Solutions. “We’re offering enterprises the best of both worlds by combining our own high availability voice, video and collaboration with Lync’s IM and Presence; creating a single, web centric, client. O...
Apr. 21, 2015 09:00 AM EDT Reads: 1,346
SYS-CON Events announced today that GENBAND, a leading developer of real time communications software solutions, has been named “Silver Sponsor” of SYS-CON's WebRTC Summit, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. The GENBAND team will be on hand to demonstrate their newest product, Kandy. Kandy is a communications Platform-as-a-Service (PaaS) that enables companies to seamlessly integrate more human communications into their Web and mobile applications - creating more engaging experiences for their customers and boosting collaboration and productiv...
Apr. 21, 2015 09:00 AM EDT Reads: 2,494
SYS-CON Events announced today that SoftLayer, an IBM company, has been named “Gold Sponsor” of SYS-CON's 16th International Cloud Expo®, which will take place June 9-11, 2015 at the Javits Center in New York City, NY, and the 17th International Cloud Expo®, which will take place November 3–5, 2015 at the Santa Clara Convention Center in Santa Clara, CA. SoftLayer operates a global cloud infrastructure platform built for Internet scale. With a global footprint of data centers and network points of presence, SoftLayer provides infrastructure as a service to leading-edge customers ranging from ...
Apr. 21, 2015 08:45 AM EDT Reads: 2,624
SYS-CON Events announced today that BroadSoft, the leading global provider of Unified Communications and Collaboration (UCC) services to operators worldwide, has been named “Gold Sponsor” of SYS-CON's WebRTC Summit, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. BroadSoft is the leading provider of software and services that enable mobile, fixed-line and cable service providers to offer Unified Communications over their Internet Protocol networks. The Company’s core communications platform enables the delivery of a range of enterprise and consumer calling...
Apr. 21, 2015 08:30 AM EDT Reads: 2,332