There was a problem loading the comments.

Sending mail with aspSmartMail object

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
You may refer the sample code as below.

<%
On error resume next
Dim mySmartMail
Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
' Mail Server
' ***********
mySmartMail.Server = "localhost"
' From
' ****
mySmartMail.SenderName = "Your Name"
mySmartMail.SenderAddress = "youremail@yourdomain.com"
' To
' **
mySmartMail.Recipients.Add "yourfriend@anydomain.com", "Friend's name"
' Message
' *******
mySmartMail.Subject = "aspSmartMail Sample 1"
mySmartMail.Body = "This mail has been sent with aspSmartMail."
' Send the message
' ****************
mySmartMail.SendMail
if Err.Number<>0 then
Response.write "Error: " & Err.description
else
Response.write "An e-mail has just been sent to " &
mySmartMail.Recipients.Item(1).Name & "."
end if
%>

Share via

Related Articles

Copyright © 2021 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)