How to use asp email with sample code?

How to use ASP Email?

 

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

 

Sample code:

 

  1. <%

  2. strHost="mail.serverhost.com"

  3. IfRequest("Send") <> "" Then

  4. Set Mail = Server.CreateObject("Persits.MailSender")

  5. Mail.Host = strHost

  6. Mail.From = Request("From")

  7. Mail.FromName = Request("FromName")

  8. Mail.AddAddress Request("To")

  9. Mail.Subject = Request("Subject")

  10. Mail.Body = Request("Body")

  11. strErr = ""

  12. bSuccess = False

  13. On Error Resume Next

  14. Mail.Send

  15. If Err <> 0 Then

  16. strErr = Err.Description

  17. else

  18. bSuccess = True

  19. End If

  20. End If

  21. %>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Configure email account on Android mobile phone

You can follow these steps to configure your email account on your Andriod mobile phone. -...

Configuring the email account on your iPhone

Please follow these steps to configure your email account on your iPhone. - Please go to...

Add a POP3 account in your Gmail account

- Please login into your Gmail account and click on the "settings" button on the right side of...

Configure an email account in Mac Entourage

Please Go to "Entourage/Account Settings" After please click on the "New/Configure account...

Configure an email account in Mac Mail

- Please go to "Mail/Preferences" - Please go to "Accounts" -  -  Please click "+" to add a...