ASPSMARTMAIL : DOCUMENTATION
SmartMail Object
Last modified : July 1st, 2004
© 2000-2004 Advantys. All rights reserved.

Body

The Body property is the body of the message.

Syntax
.Body

Example

<%
mySmartMail.Body = "This email has been send thanks to aspSmartMail"
%>

Charset

The character set.

Syntax
.Charset

Default value

"us-ascii"

Example

<%
mySmartMail.Charset = "ISO-8859-1 "
%>

ConfirmRead

The ConfirmReading flag. If this is set to true AND the recipients email program supports.this feature (and it is enabled) the recipients email program will send a notice back to the FromAddress confirming that this email has been read.

Syntax
.ConfirmRead

Example

<%
mySmartMail.ConfirmRead = true
%>

ContentType

The ContentType property allows you to set the ContentType header of the message's BodyText. If, for example, you wanted to send HTML as the messages's body, you could set ContentType = "text/html" and EMail programs that support HTML content could properly display the HTML text.

Syntax
.ContentType

Example

<%
mySmartMail.ContentType = "text/plain"

- or -
mySmartMail.ContentType = "text/html"
%>

DateTime

aspSmartMail create a Date/Time header for your local system using GMT. If you would like to set your own Date/Time set the DateTime property to a valid date/time string in the format defined by RFC 822 & RFC 1123.

Syntax
.DateTime

Example

<%
mySmartMail.DateTime = "Mon, 14 febr 2000 12:00 +0100"
%>

Encoding

The encoding type for attachments. The default value is MIME Base64.

Syntax
.Encoding

Default value
base64

Example

<%
mySmartMail.Encoding = "base64"
%>

Organization

The Organization sets the name of your company.

Syntax
.Organization

Example

<%
mySmartMail.Organization = "ACME Inc."
%>

Password

Sets the Password for SMTP LOGIN authentication.

Syntax
.Password

Example

<%
mySmartMail.Password = "myPassword"
%>

Priority

Sets the message priority. Priorities are 1-5 and are reflected in the X-Priority.

Syntax
.Priority

Example

<%
mySmartMail.Priority = 1
%>

ReturnReceipt

The ReturnReceipt flag. If this is set to true AND the recipients SMTP server supports. this feature (and it is enabled) the recipients SMTP server will send a notice back to the SenderAddress confirming that this email has been delivered.

Syntax
.ReturnReceipt

Example

<%
mySmartMail.ReturnReceipt = true
%>

SenderAddress

The message sender’s address.

Syntax

.SenderAddress

Example

<%
mySmartMail.SenderAddress = "john.doe@domain.com"
%>

SenderName

The message sender’s name.

Syntax

.SenderName

Example

<%
mySmartMail.SenderName = "John DOE"
%>

SendMail

The SendMail method attemps to send the email.

Syntax
.SendMail

Example

<%
On Error Resume Next


Dim MySmartMail
Set MySmartMail = Server.CreateObject("AspSmartMail.SmartMail")

MySmartMail.Server = "mail.domain.com"
MySmartMail.SenderAddress = "john.doe@domain.com"

MySmartMail.Recipients.Add "john.doe@domain.com", "John DOE"
MySmartMail.Subject = "Hello John"
MySmartMail.Body = "Dear John,..."

MySmartMail.SendMail

If Err.Number <> 0 Then
   Response.Write ("Error: " & Err.Description)
Else
   Response.Write ("aspSmartMail has sent your message.")
End If

%>


Server

The Server property contains the remote SMTP host that the message will be sent through. This is typically an SMTP server located at your local ISP or it could be an internal SMTP server on your companies premises.

Syntax
.Server

Example

<%
mySmartMail.Server = "mail.domain.com"

- or -
mySmartMail.Server = "123.456.789.1"
%>

ServerTimeOut

The ServerTimeout property is the maximum time that aspSmartMail should wait for a response from the mail server.

Syntax
.ServerTimeout

Default value
20

Example

<%
mySmartMail.ServerTimeOut = 35
%>

Subject

The Subject property is the subject of the message.

Syntax
.Subject

Example

<%
mySmartMail.Subject = "Here is a sample."
%>

Username

Sets the Username for SMTP LOGIN authentication.

Syntax
.Username

Example

<%
mySmartMail.Username = "myUsername"
%>

XMailer

The XMailer sets the name of your application in the tag X-Mailer of the email.

Syntax
.XMailer

Example

<%
mySmartMail.XMailer = "myWebApplication"
%>

© 2000 Advantys. All rights reserved.