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 = "[email protected]"
' To
' **
mySmartMail.Recipients.Add "[email protected]", "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 © 2024 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)