Send Email Using ColdFusion

In this post, we will show you how to send emails via ColdFusion using the cfmail tag. Following is a sample code to send out emails using ColdFusion on our servers:

<cfmail to=”email@domain.com” from=”yourEmail@yourDomain.com” subject=”Test Coldfusion mail” type=”html” server=”localhost” username=”yourEmail@yourDomain.com” password=”your_pass”>
   
Hi, This email was sent using coldfusion.    
     
</cfmail>            
<cfoutput>
    We have just sent you the welcome email.
</cfoutput>

Please note the following:

  • to=”email@domain.com” is to be replaced with the email address you want to send an email to it.
  • from=”yourEmail@yourDomain.com” is the email account you have set it up in your control panel.
  • subject=”Test Coldfusion mail” is to be replaced by your message subject.
  • username=”yourEmail@yourDomain.com” is same as the from email.
  • password=”your_pass” is the password entered when you setup your e-mail account in your control panel.

You can also use your own variables in the code above. Example: to=”#form.UserEmailAddress#”

Now you know how to send out email using ColdFusion.

Looking for quality ColdFusion Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under 3rd Party Software | RSS 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *


× 2 = 10

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>