Difference between revisions of "Cfmail"

From Hostek.com Wiki
Jump to: navigation, search
(Created page with "==Sending Using Default SMTP== This method will allow you to send through the servers default SMTP server. You'll need to make sure and leave out the server, username, and pas...")
 
m (Sending Using External SMTP: The example was missing the port and useSSL attributes which are required when sending through external servers.. ~~~~)
Line 19: Line 19:
 
<cfmail.
 
<cfmail.
 
   server="mail.example.com"
 
   server="mail.example.com"
 +
  port="25"
 +
  useSSL="false"
 
   username="example@example.com"
 
   username="example@example.com"
 
   password="mySecretPassword!"
 
   password="mySecretPassword!"

Revision as of 17:08, 8 July 2012

Sending Using Default SMTP

This method will allow you to send through the servers default SMTP server. You'll need to make sure and leave out the server, username, and password attributes when using this method as shown below:

<cfmail
  from="#from#"
  to="#to#"
  subject="Sample CF e-mail">

This is the body of a test email.

</cfmail>

Sending Using External SMTP

This second method will allow you to send through an external SMTP server such as mail.example.com. It requires using the server,username, and password attributes as shown below:

<cfmail.
  server="mail.example.com"
  port="25"
  useSSL="false"
  username="example@example.com"
  password="mySecretPassword!"
  from="#from#"
  to="#to#"
  subject="Sample CF e-mail">

This is the body of a test email.

</cfmail>