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
Rad1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.