Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Mail

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
Im getting this error when using asp mail
any idea where im going wrong
Mail send Failure. Error was503 must have sender and recipient first

<%
Set mailer = Server.CreateObject(&quot;SMTPsvg.Mailer&quot;)

strFirstName = request.form(&quot;FirstName&quot;)
strEmail = request.form(&quot;Email&quot;)
strLastName = request.form(&quot;LastName&quot;)
strPhone = request.form(&quot;Phone&quot;)


Mailer.FromName = Request.Form(&quot;FirstName&quot;)

Mailer.AddRecipient &quot;Test&quot;,&quot;Webmaster@mysite.com&quot;
Mailer.FromAddress = Request.Form(&quot;Email&quot;)
Mailer.RemoteHost = &quot;mail7.myserver.com&quot;

'Mail.AddAttachment &quot;c:\any file&quot;
strBodyHeader = &quot;Someone has asked to help out&quot; & chr(13) & chr(10) & chr(13) & chr(10)
strBodyHeader = strBodyHeader & &quot;This is thier first name : &quot; & strFirstName & chr(13) & chr(10)
strBodyHeader = strBodyHeader & &quot;This is thier last name : &quot; & strLastName & chr(13) & chr(10)
strBodyHeader = strBodyHeader & &quot;This is thier Email address : &quot; & strEmail & chr(13) & chr(10)
strBodyHeader = strBodyHeader & &quot;This is thier phone number : &quot; & strPhone & chr(13) & chr(10)
strBody = strBodyHeader & strBody
Mailer.Subject = &quot;Volunteer Application&quot;
Mailer.BodyText = strBody
'Mail.Body = &quot;Dear Fan:&quot; & Chr(13) & Chr(10) & &quot;Thank you for your business.&quot;


If Mailer.SendMail then
Response.Write &quot;Mail sent&quot;
else
Response.Write &quot;Mail send Failure. Error was&quot;& Mailer.Response
end if
%>
-------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top