Sending email from your site using CFMAIL

Here are examples of the CFMAIL tag you can use on ColdFusion hosting plans to send email from your website. There are additional attributes but these are the most basic required attributes that will need to be customized according to your site.


For those on ColdFusion MX hosting plans, you can use the following code:

If you do not have a domain name, you can use the mail server name assigned to you
Exmple: maila2.webcontrolcenter.com

<CFMAIL
server="mail.YourDomain.com"
username=“AnyEmail@YourDomain.com”
password=“YourEmailPassword”
from="AnyEmail@YourDomain"
to="AnyEmail@AnyDomain.com"
subject="Any Subject">

This is the body of the message.

</CFMAIL>


For those on ColdFusion hosting plans, you can use the following code:

<CFMAIL
   server="mail.YourDomain.com"
   from="AnyEmail@YourDomain.com"
   to="AnyEmail@AnyDomain.com"
   subject="Any Subject">

   This is the body of the message.

</CFMAIL>


You can view the full documentation on the CFMAIL tag at:

For CF:
http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=email_04.html

Add Feedback