If you feel some confusion about any thing or if you do not find what you are looking for, please inform us so that we can improve our documentation accordingly. docs@aspfusion.net |
![]() |
The component allows you to send mail messages through any SMTP server provided according to standard SMTP protocol. Access to the component can also be turned on at website basis like all other ASPFusion components. AdvSMTP is much more advanced component for sending mail messages. The component provide following operations.
CC and BCC.
Multiple attachments.
Embedded images (a new feature provided by the component).
Chinese and other languages support and many other features like this.
Along with these basic operations, it provides Upload and UploadAs facility. Upload operation allows uploading single or multiple files at a time form client browser to the server. It also allows resolving the problem of name conflicting through the property NameConflict, its values are Error (default), Skip, OverWrite and MakeUnique. UploadAs operation allows uploading single or multiple files at a time form client browser to the server with specified name. Only few lines of code is all to provide browser based File Upload on your server.
The component send mails in two ways.
Blocking, in which ASP page wait for the response from the component.
Non Blocking, in which component returns control back to ASP page and trigger a service, which is then responsible for sending the mail. The service also logs all information of sent mails.
<%set
Obj = Server.CreateObject ("AdvSMTP.SMTP")%>
Property |
Description |
BCC |
Contains
the address to whom, the blind carbon copy should be sent. For multiple
recipients, addresses will be semicolon (;) separated. |
Body |
The
property is to assign the body of the mail. For a long body one can call
it multiple times. Embedded images can also be sent within the body using
a specified tag i.e. |
CC |
Contains
the address to whom, the carbon copy of the mail should be sent. For
multiple recipients, addresses will be semicolon (;) separated. |
Count |
Return
number of files to be uploaded |
ErrorReason |
Reports
any errors that occur during the request |
Form |
Return
form fields values |
IsDefined |
Check
whether a form field exists or not. Return 1 if it exist otherwise 0 |
IsError |
Returns
1 if any error occur during the request otherwise 0 |
LogFile |
By
default the logging is performed in a file AdvMail.log
on the server present in a specific directory. If the user wants the
logging to be performed in user defined path then he can specify his own
path for logging. |
Logging |
Used
to specifying what type of logging should be performed. Valid values are |
NameConflict |
Determines
how the file should be handled if its name conflicts with the name of a
file that already exists in the directory. Valid values are |
Port |
It
is the port by which the mail should be sent if no port is specified then
a port 25 is used for sending
the mails. |
Receipt |
It
is used, if mail sender wants to get information back, when mail receiver
reads the mail message. If this value is set TRUE, then mail sender will
get information that the mail receiver reads the mail, otherwise mail
sender will not be informed. Valid values are TRUE FALSE (default) Example: <%Obj.Receipt = true%> |
Server |
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. |
SetMaxFileSize |
Specified
the maximum allowed size of the files to be uploaded |
Subject |
It
is the subject of the mail. |
Truncate |
If
this property is set to TRUE and size of the file being uploaded exceed
the maximum file size, then file is truncated to maximum file size
mentioned. If it is FALSE then file is not uploaded if file size exceed
the limit.
Valid values are |
Type |
It
defines the mail type. Valid values are |
Method |
Parameter |
Return Value |
Description |
CustomHeader |
ID Value |
None |
Set
custom header in mail. The
ID parameter is ID for custom header and Value parameter is to specify its
value. Example: <%Obj.CustomHeader ID, Value%> |
MimeAttach |
FileName |
None |
Sets
the attachment file that must be sent along with the mail. For multiple
files the method can be called multiple times. FileName has the path of
the attachment file and DelFlag to specify whether to delete the file
after sending mail. Valid values are |
SendMail |
To |
None |
SendMail
is used to instantly send the mail to the recipients. In the parameter
“To” the recipient’s address is specified. For multiple recipients
“To” will be semicolon (;) delimited addresses. |
SendQMail |
To |
None |
SendQMail
copies the contents of the mail in a file and places the mail request in a
Queue. An NT Service running on the Server then performs the job of
sending the mail. “To” specifies the recipients’ mailing address.
For multiple recipients “To” will be a semicolon delimited string of
recipients addresses. |
Upload |
SaveTo |
Array of objects |
Upload
all files to the given path Example: <%set Upload = Obj.Upload(SaveTo for each Member in Upload =Member.ClientFileName =Member.ClientFileExtension =Member.ServerFileName =Member.ServerFileExtension =Member.ContentType =Member.FileField =Member.CreationTime =Member.LastModifiedTime =Member.FilePath =Member.FileSize next set Upload = nothing%> |
UploadAs |
SaveTo |
Array of objects |
Upload
files to the given path with given filename Example: <%set Upload = Obj.UploadAs(SaveTo) for each Member in Upload if (Member.FileField = "File1") then Member.NameConflict = " OverWrite" Member.SaveAs(Name.extension) if (Member.IsError = 1) then Member.ErrorReason else =Member.ClientFileName =Member.ClientFileExtension =Member.ServerFileName =Member.ServerFileExtension =Member.ContentType =Member.FileField =Member.CreationTime =Member.LastModifiedTime =Member.FilePath =Member.FileSize end if end if next set Upload = nothing%> |
Copyright © 2000, Advanced Communications |