PDA

View Full Version : using AspMail component code sample


futurepopbe
02-24-2003, 03:00 AM
Hello,

I would like to use the aspmail component.
Someone has some sample code for this ??
Many thanks !

bruce
02-24-2003, 10:18 AM
<html>
<head>
</head>
[b]
<%

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "DiscountASP"
Mailer.FromAddress= "someone@discountasp.net"
Mailer.RemoteHost = "localhost"
Mailer.AddRecipient "John Doe", "john@doe.com"
Mailer.Subject = "This is a sample email sent from ASPMail"
Mailer.BodyText = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if


%>
</body>
</html>



[b]quote:Originally posted by futurepopbe

Hello,

I would like to use the aspmail component.
Someone has some sample code for this ??
Many thanks !
</blockquote id="quote"></font id="quote">