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
%> |