• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1133
  • Last Modified:

How and where do I set SMTP server setting in CFMail ColdFusion 9.01

Hello,

How and where do I set SMTP server setting in CFMail ColdFusion 9.01?

Also, a sample code will be great too?

Thank you,
Rad1
0
Rad1
Asked:
Rad1
  • 3
1 Solution
 
_agx_Commented:
You configure the SMTP server in the CF Admin.  Rather than repeating the documentation, I'm pasting the basic steps here:

Configure ColdFusion for e-mail

    * In the ColdFusion Administrator, select Server Settings > Mail.

    * In the Mail Server box, enter the name or IP address of your SMTP mail server.

    * (Optional) Change the Server Port and Connection Timeout default settings.

    * Select the Verify Mail Server Connection option to make sure ColdFusion can access your mail server.

   *  If your mail server does not use port 25, the default, SMTP port, change the Server Port default settings.

    * Depending on your ColdFusion edition, the Mail page in the Administrator has additional options that you can use to configure and optimize ColdFusion mail behavior. Select these options as appropriate.

    * Click Submit Changes.

    ColdFusion saves the settings. The page displays a message indicating success or failure for connecting to the server.

BTW: If you're running enterprise, you can override those server settings in the <cfmail> tag.
0
 
Rad1Author Commented:
Thank you
0
 
Rad1Author Commented:
Also, please send me a small sample for the <cfmail> tag if you would?
0
 
LajuanTaylorCommented:
The following snippet can be used if you want to add html formatting to the email. It's not required.

Also, I did not specify a password or smtp server in the attributes because the sample assumes its defined already in the CF Admin.
<cfparam name="fromEmail" type="string" default="">
<cfparam name="toEmail" type="string" default="">
<cfparam name="ccEmail" type="string" default="">
<cfparam name="bccEmail" type="string" default="">
<cfparam name="messageBody" type="string" default="">      

<!---  --->
<cfmail to="#toEmail#" cc="#ccEmail#" bcc="#bccEmail#" from="#fromEmail# (Automated Email Notification)" subject="Email Report - XX" timeout=60 type="HTML">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
<p><strong>*** DAILY STATUS CHECK ***</strong></p>
<p>This automated notificationy<br /> 

<p>
<strong>Helpful Troubleshooting Tips</strong>:<br />
1. Please make sure the computer is on where the upload scripts are executed. <br />
2. Make sure any associated scheduled windows tasks are functioning.<br />
3. Please verify that any directory paths used by scripts have not been changed. <br />
</p>

<strong>IT Section</strong><br />
E-Mail: <a href="mailto:webmaster@somedomian.com">webmaster@somedomian.com</a>
</p><br />
<table width="80%" border="1">
  <tr>
    <th scope="col">System Message</th>
    <th scope="col">Location</th>    
  </tr> 
	<!--- A dynamic message could go in the messageBody variable... --->
    <cfoutput>
            <tr>
                <td>#messageBody#</td>  
        </tr>
    </cfoutput> 
</table>
</body>
</html>
</cfmail>

Open in new window

0
 
Rad1Author Commented:
Thank you very kindly!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now