ColdFusion 9: New Application Level SMTP Sever Settings for CFMail

  Oct 11, 2009     16494 Views      ColdFusion       Comments (5)   

ColdFusion 9 shipped with lots of new features that include some new variables which are added to the Application.cfc file. One among them is the new application level SMTP server setting. We can specify the SMTP server setting details to "smtpServersettings" attribute of THIS scope in Application.cfc which takes three values and they are server, username and password as a structure.

<cfcomponent displayname="CF9ApplicationVariables" output="false">

   <cfset   = "CF9ApplicationVariables" />
   <cfset this.smtpserversettings   = {
                              } />


The above code has the "this.smtpServersetting" property defined in the Application.cfc file.

      subject="ColdFusion 9 New smtpServersettings Feature"

      Dear ColdFusion,
      You make my life much easier with your every cool
      and new features and functionalities.


Now the CFMail tag will use the server details for sending mails as mentioned above in "smtpServersetting" in Application.cfc and it won't use the server values specified in the ColdFusion 9 Administrator. If "smtpServersetting" attribute is not used then CFMail will behave as normally.

And another great feature to mention is ColdFusion 9 Administrator will have a new interface which allows us to view the undelivered emails in the ColdFusion Administrator itself. ColdFusion Rocks!



1. David R on Oct 12, 2009 at 4:42 AM

Nice feature Akbar!.. And to make CF to resend an undelivered mail, we just need to copy the contents from "Undelivr" directory to the "Spool" directory, and that will do!.

2. Ben Nadel on Oct 12, 2009 at 12:50 PM

This is an awesome feature! Seems like this will be great for setting of development / production separation of email concerns.

3. Akbarsait on Oct 13, 2009 at 9:01 AM

Glad you like this feature.

This is really an awesome addition to ColdFusion 9 and will be helpful for developers to mention the Email servers for Dev / Staging / Production environment.

4. Naveen on Oct 16, 2009 at 1:51 AM

Cool Feature... Nice post Akbar... Please do keep the good work up...

5. Misty on Feb 21, 2012 at 4:46 AM

Can i use this settings in Application.cfm, it is still supported right and where it will be written

About Me

CFML/Web/Cloud/Data/Agile Enthusiast, Husband & Dad, an avid learner & android fan who works as a Tech Consultant in Toronto, Canada.!
Get Your Next CFML Job!
ColdFusion Tuts
ColdFusion Tutorials & Resources


Adobe Agile AppCore Creator BlogCFC Books Bootstrap CFBuilder CFEclipse CFML Chennai CFUG Chrome Extensions ColdFusion Google IIS India Learning MySQL Railo Subversion Tools & Utilities Web Windows 7


2021 2018 2017 2016 2014 2013 2012 2011 2010 2009 2008


Akbarsait © 2008 - 2023 | Hosting provided by Vivio Technologies

Home | Blog | Sitemap | RSS Feed