ASPSMARTMAIL : DOCUMENTATION |
SmartMail
Object Last modified : July 1st, 2004 © 2000-2004 Advantys. All rights reserved. |
The Body property is the body of the message.
Syntax
.Body
Example
<%
mySmartMail.Body = "This email has been send thanks to aspSmartMail"
%>
The character set.
Syntax
.Charset
Default value
"us-ascii"
Example
<%
mySmartMail.Charset = "ISO-8859-1 "
%>
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
.ConfirmReadExample
<%
mySmartMail.ConfirmRead = true
%>
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"
%>
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"
%>
The encoding type for attachments. The default value is MIME Base64.
Syntax
.Encoding
Default value
base64
Example
<%
mySmartMail.Encoding = "base64"
%>
The Organization sets the name of your company.
Syntax
.OrganizationExample
<%
mySmartMail.Organization = "ACME Inc."
%>
Sets the Password for SMTP LOGIN authentication.
Syntax
.PasswordExample
<%
mySmartMail.Password = "myPassword"
%>
Sets the message priority. Priorities are 1-5 and are reflected in the X-Priority.
Syntax
.PriorityExample
<%
mySmartMail.Priority = 1
%>
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
.ReturnReceiptExample
<%
mySmartMail.ReturnReceipt = true
%>
The message senders address.
Syntax
.SenderAddressExample
<%
mySmartMail.SenderAddress = "john.doe@domain.com"
%>
The message senders name.
Syntax
.SenderNameExample
<%
mySmartMail.SenderName = "John DOE"
%>
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
%>
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
.ServerExample
<%
mySmartMail.Server = "mail.domain.com"
- or -
mySmartMail.Server = "123.456.789.1"
%>
The ServerTimeout property is the maximum time that aspSmartMail should wait for a response from the mail server.
Syntax
.ServerTimeoutDefault value
20Example
<%
mySmartMail.ServerTimeOut = 35
%>
Subject
The Subject property is the subject of the message.
Syntax
.Subject
Example
<%
mySmartMail.Subject = "Here is a sample."
%>
Sets the Username for SMTP LOGIN authentication.
Syntax
.UsernameExample
<%
mySmartMail.Username = "myUsername"
%>
The XMailer sets the name of your application in the tag X-Mailer of the email.
Syntax
.XMailerExample
<%
mySmartMail.XMailer = "myWebApplication"
%>
© 2000 Advantys. All rights reserved.