This topic is locked

Let's talk SMTPsvg.Mailer

1/14/2006 1:58:01 PM
ASPRunnerPro General questions
G
gwr477 author

Hi Sergey,
Got the basic SMTPsvg.Mailer to work correctly. But, when I try to add form field content into the email I get the following error. I placed the code after the rs.Update.

===========================================
Request object error 'ASP 0207 : 80004005'
Cannot use Request.Form
/assignment/ias_add.asp, line 2358
Cannot use Request.Form collection after calling BinaryRead.
=============================================================
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")

Mailer.FromName = "fromName"

Mailer.FromAddress = "fromAddress"

Mailer.RemoteHost = "smtp-relay.**.com"

Mailer.AddRecipient "toName", "toAddress"

Mailer.Subject = "My Subject Line"

Mailer.BodyText = Request.Form("Email") & Request.Form("Company") & "," & Request.Form("TodaysDate")

if Mailer.SendMail then

Response.Write "Mail sent..."

else

Response.Write "Mail send failure. Error was " & Mailer.Response

end if

Admin 1/14/2006

Instead of using Request.Form("Company") you need to use GetRequestForm("Company").
For more details you can check sample actions code that comes with ASPRunnerPro.

G
gwr477 author 1/15/2006

Instead of using Request.Form("Company") you need to use GetRequestForm("Company").

For more details you can check sample actions code that comes with ASPRunnerPro.


Thanks, that did it!