SMTPsvg
I've seen a few pages using this thing to send mail from ASPages, instead of CDONTS.
I want to send mail using ASP, but I do not have a local server.. Only a remote one.
Will this work?
Here's some examples:
<%
DIM HTML
HTML = "<html><head><title>"ASPMail Sample"</title><meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">" & vbCrLf
HTML = HTML & "</head><body bgcolor=#FFFFFF><table width=640 border=0 cellspacing=0 cellpadding=4>" & vbCrLf
HTML = HTML & "<tr><td><img src="" & vbCrLf
HTML = HTML & "<tr><td bgcolor=#666699><b><font style=""font-family:Verdana, sans-serif"" size=4 color=#FFFFFF>Ask the Junkie Confirmation</font></b></td></tr>" & vbCrLf
HTML = HTML & "<tr><td><font style=""font-family:Verdana, sans-serif"" size=2>" & vbCrLf
HTML = HTML & "<p> Your question has been submitted to <b>Ask the Junkie</b>. " & vbCrLf
HTML = HTML & "We will reply with an answer as soon as we can, based on the volume of questions " & vbCrLf
HTML = HTML & "coming in at this time. If we chose your question for publication, you will be notified " & vbCrLf
HTML = HTML & "via e-mail.</p><p>Thank you,</p><p>" & vbCrLf
HTML = HTML & "<a href="" | "
HTML = HTML & "<a href=""ASPNextGen.com"">ASPNextGen.com</a></p></font>" & vbCrLf
HTML = HTML & "</td></tr></table></body></html>"
'DEFINE VARIABLES FOR ASPEMAIL
DIM Mailer
SET Mailer = Server.CreateObject("SMTPsvg.Mailer"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Mailer.FromName = "ASPNextGen.com"
Mailer.FromAddress= "askthejunkie@ASPNextGen.com"
Mailer.RemoteHost = "mail.server.com"
Mailer.AddRecipient "askthejunkie", "doug.seven@codejunkies.net"
Mailer.AddCC "Darkside", "darkside103@hotmail.com"
Mailer.Subject = "Ask the Junkie Confirmation"
Mailer.ContentType = "text/html"
Mailer.BodyText = HTML
Mailer.Priority = 2
'If the email fails, prompt the user to click back and try again
IF Mailer.SendMail THEN
Response.Redirect("askjunkie.asp?mode=2"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ELSE
Response.Redirect("askjunkie.asp?mode=3"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
END IF
Think I need anything else, besides IIS and a remote SMTP server?
Thx!
I've seen a few pages using this thing to send mail from ASPages, instead of CDONTS.
I want to send mail using ASP, but I do not have a local server.. Only a remote one.
Will this work?
Here's some examples:
<%
DIM HTML
HTML = "<html><head><title>"ASPMail Sample"</title><meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">" & vbCrLf
HTML = HTML & "</head><body bgcolor=#FFFFFF><table width=640 border=0 cellspacing=0 cellpadding=4>" & vbCrLf
HTML = HTML & "<tr><td><img src="" & vbCrLf
HTML = HTML & "<tr><td bgcolor=#666699><b><font style=""font-family:Verdana, sans-serif"" size=4 color=#FFFFFF>Ask the Junkie Confirmation</font></b></td></tr>" & vbCrLf
HTML = HTML & "<tr><td><font style=""font-family:Verdana, sans-serif"" size=2>" & vbCrLf
HTML = HTML & "<p> Your question has been submitted to <b>Ask the Junkie</b>. " & vbCrLf
HTML = HTML & "We will reply with an answer as soon as we can, based on the volume of questions " & vbCrLf
HTML = HTML & "coming in at this time. If we chose your question for publication, you will be notified " & vbCrLf
HTML = HTML & "via e-mail.</p><p>Thank you,</p><p>" & vbCrLf
HTML = HTML & "<a href="" | "
HTML = HTML & "<a href=""ASPNextGen.com"">ASPNextGen.com</a></p></font>" & vbCrLf
HTML = HTML & "</td></tr></table></body></html>"
'DEFINE VARIABLES FOR ASPEMAIL
DIM Mailer
SET Mailer = Server.CreateObject("SMTPsvg.Mailer"
Mailer.FromName = "ASPNextGen.com"
Mailer.FromAddress= "askthejunkie@ASPNextGen.com"
Mailer.RemoteHost = "mail.server.com"
Mailer.AddRecipient "askthejunkie", "doug.seven@codejunkies.net"
Mailer.AddCC "Darkside", "darkside103@hotmail.com"
Mailer.Subject = "Ask the Junkie Confirmation"
Mailer.ContentType = "text/html"
Mailer.BodyText = HTML
Mailer.Priority = 2
'If the email fails, prompt the user to click back and try again
IF Mailer.SendMail THEN
Response.Redirect("askjunkie.asp?mode=2"
ELSE
Response.Redirect("askjunkie.asp?mode=3"
END IF
Think I need anything else, besides IIS and a remote SMTP server?
Thx!