How To Use AspEmail?

Persits Software's AspEmail 5.0 is an active server component for sending e-mail messages using an external SMTP server in an ASP or VB environment. AspEmail 5.0 supports multiple recipients, multiple file attachments, HTML format, embedded images and sounds, non-US ASCII character sets, secure mail, and high-performance message queuing.

Line No Coding
1 <%
2 Set Mail = Server.CreateObject("Persits.MailSender")
3 Mail.Host = "mail.YourDomain.com" ' Specify a valid SMTP server
4 Mail.From = "user@YourDomain.com" ' Specify sender's address
5 Mail.Username = "user@YourDomain.com" ' Specify sender's username
6 Mail.Password = "Password" ' Specify sender's password
7 Mail.FromName = "First Name Last Name" ' Specify sender's name
8 Mail.AddAddress "Andrew@OtherDomain.com", "Andrew Johnson, Jr."
9 Mail.AddAddress "Paul@OtherDomain.com" ' Name is optional
10 Mail.AddBCC "Bill@OtherDomain.com" ' BCC user
11 Mail.AddReplyTo "user@YourDomain" 'Specify Reply to user
12 Mail.Subject = "My ASPEmail" ' Specify your ASP Email Subject
13 Mail.AddAttachment "c:\images\cakes.gif" ' Specify your domain physical file to attach
14 Mail.Body = "Dear Sir:" & Chr(13) & Chr(10) & "Thank you for your business."
15 On Error Resume Next
16 Mail.Send
17 If Err <> 0 Then ' error occurred
18 strErr = Err.Description
19 Response.Write "Error encountered: " & Err.Description
20 End If
21 %>

Line No Explanation
1 Open ASP tag
2 - 14 Set Mailer control properties and collection items
15 If there is error, go to the next line
16 Send email
17 If there is error, go to the next line
18 - 19 Display error description
20 End If statement on line (13)
21 Close ASP Tag

Sample Coding:

For further information, please refer to : http://www.aspemail.com/manual_01.html

Add Feedback