Understanding SMTP Servers

Team-Fly    

ColdFusion® MX: From Static to Dynamic in 10 Steps
By Barry Moore
Table of Contents
Step 7.  Using Email with ColdFusion MX


Before we can even begin talking about using ColdFusion to send email, we have to understand a few things about email servers. First, dedicated machines, generically called mail servers, move email around the web, and sending email is usually done with a protocol called the Simple Mail Transfer Protocol (SMTP). Second, ColdFusion is not an email server. ColdFusion can only interact with mail servers; it cannot actually send email by itself.

You send email by nominating an SMTP mail server for ColdFusion to pass messages to. This can be any SMTP server you have permission to use. If you are currently sending and receiving email with an email client, such as Outlook Express or Eudora, you have permission to use an SMTP mail server. This is typically your ISP's mail server. If you are hosting web sites with a commercial hosting company, you probably have access to its SMTP server as well.

This becomes important because ColdFusion has to be provided with the name or IP address of an SMTP server that it can use to send mail. If you are hosting your web site with a commercial ColdFusion hosting company, these details will probably already be taken care of, and you need not worry about it. If you are running a ColdFusion Server yourself, you must enter these details.

You can specify the SMTP server details in one of two ways. They can be either entered into ColdFusion Administrator or specified within your ColdFusion templates themselves.

To enter the details into ColdFusion Administrator, open ColdFusion Administrator and click on the Mail Server link in the navigation menu to the left. Figure 7.1 shows the Mail Server Settings page in ColdFusion Administrator. Simply enter the name or IP address of the mail server in the box. If the port that your SMTP server uses is something other than the default SMTP port of 25, you can enter the correct value in the Server Port box. Click the Submit Changes button and that is all there is to it. All web sites using this ColdFusion server will use the nominated SMTP server to send mail.

Figure 7.1. ColdFusion Administrator mail server settings.

graphics/07fig01.gif

If you are using a hosting company and do not have access to ColdFusion Administrator (or if you want to override the settings in ColdFusion Administrator), you can specify the server settings you want to use in your templates by using the <CFMAIL> tag.


    Team-Fly    
    Top
     



    ColdFusion MX. From Static to Dynamic in 10 Steps
    ColdFusion MX: From Static to Dynamic in 10 Steps
    ISBN: 0735712964
    EAN: 2147483647
    Year: 2002
    Pages: 140
    Authors: Barry Moore

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net