Home Site Map Buy Email
AdvSMTP
AdvIMAP4
AdvPOP3
AdvFile
AdvZIP
AdvGraphGenerator
AdvLDAP
AdvHTTP
AdvDSN
AdvDirectory
AdvRegistry
AdvMX
ASP Components >> AdvSMTP >> CF_MAIL
Download | Buy
CF_MAIL

CF_MAIL

CF_MAIL allows you to send email messages. See also CF_POP.

See also CF_MAILPARAM and CF_MAILHTMLBODY.

Syntax

<CF_MAIL TO="recipient"
    FROM="sender"
    CC="copy_to"
    BCC="blind_copy_to"
    SUBJECT="msg_subject"
    TYPE="msg_type"
    MIMEATTACH="path"
    SERVER="servername"
    PORT="port_ID"
    IPADDRESS="ipaddress"
    HELO="host_name"
    MAILERID="headerid"
    CHARSPERLINE="number"
    DNSSERVER="dns_servername"
    DNSTIMEOUT="seconds"
    LOGFILE="file_path"
    LOGGING="logging_type"
    LOOKUP="boolean"
    PRIORITY="msg_priority"
    RECEIPT="boolean"
    RECYCLEBINPATH="undeliver_path"
    SPOOLPATH="spool_path">
    message_body
</CF_MAIL>

TO

Required. The name of the recipient(s) of the email message. This can be either a static address (as in, TO="to@aspfusion.net") or dynamic (such as, TO="#Form.Email#"). For multiple recipients, TO address parameter will be semicolon ";" separated list of addresses.

FROM

Required. The sender of the email message. This attribute may be either static (e.g., FROM="from@aspfusion.net") or dynamic (as in, FROM="#GetUser.EMailAddress#").

CC

Optional. The address to whom, the carbon copy should be sent, can be specified through this parameter. For multiple recipients, it will be semicolon ";" separated list of addresses.

BCC

Optional. The address to whom, the blind carbon copy should be sent, can be specified through this parameter. For multiple recipients, it will be semicolon ";" separated list of addresses.

SUBJECT

Optional. The subject of the mail message can be specified through this parameter.

TYPE

Optional. Specifies type for the message. Currently, there are two values for this attribute "HTML" and "TEXT". Specifying TYPE= "HTML" informs the receiving email client that the message has embedded HTML tags that need to be processed. This is only useful when sending messages to mail clients that understand HTML. If not specfied then default TEXT type is selected.

MIMEATTACH

Optional. Specifies the attachment file that must be send along with the mail message.

SERVER

Optional. It is the SMTP server through which the mail will be sent. If it is not specified then the mail will be sent by any of the default servers which are already set in registry.

PORT

Optional. It is the port through which the mail should be sent. If no port is specified then a default port 25 is used for sending mail message.

IPADDRESS

Optional. It is the network address of the connected socket, a dotted number such as "128.56.22.8". If not specified then system's default network address is used.

HELO

Optional. This property is used to specify host name of the sending e-mail for the SMTP HELO command. If not specified then system name is used as host name.

MAILERID

Optional. Specifies a mailer ID to be passed in the X-Mailer SMTP header, which identifies the mailer application. The default is ASPFusion CF_MAIL Tag.

CHARSPERLINE

Optional. It is used, if mail sender wants to set characters per line. If it is not specified then default 76 characters per line is used. Minimum characters per line allowed are 60. If number of characters assigned to this parameter are less than minimum allowed characters per line then tag will not generate any error but will use default value.

DNSSERVER

Optional. It is used, if mail sender wants to send mail directly by setting Lookup property and want CF_MAIL to perform lookup through specified DNS server. If it is not specified then system's default DNS server is used to perform lookup.

DNSTIMEOUT

Optional. It is used, if mail sender wants to send mail directly by setting Lookup property and want CF_MAIL to set timeout while performing lookup through DNS server. If it is not specified then default DNS server timeout value is used to perform lookup.

LOGFILE

Optional. This parameter is used to specify log file to perform logging. If mail sender wants CF_MAIL to perform logging in specified file then log file can be specified using this property. CF_MAIL performs logging in CSV format which can easily be imported to any database and can easily be parsed out. If Logging parameter is assigned a value ErrorLogging or CompleteLogging then you must assign log file to this LogFile parameter, otherwise tag will not perform any logging.

LOGGING

Optional. Used to specify what type of logging should be performed. Valid values are

  • NoLogging
  • tag will not perform any logging, and there will be no tracked information whether mail is sent successfully or not
  • ErrorLogging (default)
  • only error logging will be performed, and tag will log only those mails which results in some error
  • CompleteLogging
  • used to perform complete logging, and tag will log all mails whether it is sent successfully or results in some error

LOOKUP

Optional. This parameter is used, if mail sender wants to send mail without using any external or specified SMTP server. Valid values are

  • TRUE
  • if this parameter is set as TRUE then tag will send mail using reciepient's SMTP server
  • FALSE (default)
  • if this parameter is set as FALSE then tag will not send mail untill some external SMTP server is specified

PRIORITY

Optional. Mail sender can set priority of the mail message through this property. Valid values are

  • Low
  • tag will send mail with low priority
  • Normal (default)
  • will send mail with normal priority
  • High
  • is used to send mail with high priority

RECEIPT

Optional. It is used, if mail sender wants to get information back, when mail receiver reads the mail message. Valid values are

  • TRUE
  • if this parameter is set as TRUE then mail sender will be informed back that the mail receiver reads the mail
  • FALSE (default)
  • if it is set as FALSE then mail sender will not be informed back

RECYCLEBINPATH

Optional. This property is used, if mail sender wants to place his undeliverable mails in his own folder. If it is not specified then default undeliverable folder is used which is already set in registry.

SPOOLPATH

Optional. This property is used, if mail sender wants to place his mail messages in his own spool folder. If it is not specified then default spool folder is used which is already set in registry.

Example

<!--- This view-only example shows the use of CF_MAIL --->

<HTML>
<HEAD>
	<TITLE>CF_MAIL Example</TITLE>
</HEAD>
<BODY>

<H3>CF_MAIL Example</H3>

<P>This view-only example shows the use of CF_MAIL. 
If your ASPFusion SMTP mail settings are configured successfully,
you will be able to use this code to send simple email.</P>

<CF_MAIL TO="to@aspfusion.net"
         FROM="from@aspfusion.net"
         SUBJECT="this is testing mail message">
     
     This is testing message sent by CF_MAIL (AdvSMTP).
</CF_MAIL>

</BODY>
</HTML>