Setting the ColdFusion Mail Server


ColdFusion doesn't have a mail server of its own. To send e-mail, it uses a mail server that supports Simple Mail Transfer Protocol (SMTP), such as IIS or Exchange Server on Windows NT/2000, or sendmail on Linux and UNIX systems. ColdFusion uses Post Office Protocol (POP) for receiving e-mails. You need to consult the network administrator or the Internet Service Provider (ISP) to determine the host name or IP address of the SMTP server to configure the mail server for ColdFusion. You can configure the SMTP server in ColdFusion Administrator by accessing the Mail Server option on the Server Settings menu. You need to have the rights to log on to the Mail Server settings page. Otherwise, use the server attribute of the <cfmail> tag to change the settings. This attribute overrides the server setting configured in ColdFusion Administrator.

To add the mail server settings, perform the following steps:

  1. Open the ColdFusion Administrator application.

  2. Click the Mail Server option on the Server Settings menu in the left panel.

  3. Enter a valid SMTP server address in the Mail Server box.

  4. Check the Select the Verify Connection option.

  5. Click the Submit Changes button to accept the settings.

Figure 27.1 shows the administrative page for adding the Mail Server settings.

click to expand
Figure 27.1: The Mail Server options.

Here are the various options available in the preceding page:

  • Mail Server. Specifies the server for sending e-mail messages in the form of a domain name, such as servername@domain.com, or an IP address, such as 168.0.0.1. Using an IP address is faster and more fault-tolerant than using a domain name, because the domain name is resolved into an IP address anyway.

  • Server Port. Specifies the TCP/IP port to be used to connect to the ColdFusion server. The default port is 25. To use any other port number, you need to consult the network administrator or the ISP.

  • Spool Interval. Indicates the time interval between the processing of consecutive spooled e-mails. This is measured in seconds, and the default value is 60. Sending e-mails through SMTP is a background process. The user doesn't have to wait for further processing after sending a request to the SMTP server. The e-mails are stored in a directory such as C:\CFusion\mail\spool. The SMTP server looks up this directory after the specified time interval to process any pending requests.

  • Connection Timeout. Specifies how long ColdFusion waits before an e-mail server connection fails. The default, timeout value is 60 seconds. You can increase this value if the mail server isn't reliable and connections time out frequently.

If you check the Verify Mail Server Connection option, ColdFusion tests the settings upon page submission. The output of the verification either succeeds, as shown in Figure 27.2, or fails, as shown in Figure 27.3.

click to expand
Figure 27.2: The screen indicating successful verification.

click to expand
Figure 27.3: The screen indicating that the verification wasn't successful.

Caution

Enter a valid SMTP or IP address in the Mail Server option on the ColdFusion Administrator page. Otherwise, your e-mails won't reach their destination.

Note

If you can connect to the server, it doesn't necessarily mean that the mail server is installed or running. It just means that the computer can be contacted.




Macromedia ColdFusion MX. Professional Projects
ColdFusion MX Professional Projects
ISBN: 1592000126
EAN: 2147483647
Year: 2002
Pages: 200

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