Forums

This topic is locked

Microsoft VBScript compilation error '800a0400'

Posted 18 Apr 2007 16:15:17
1
has voted
18 Apr 2007 16:15:17 h b posted:
Hi,
I have this mail script and it gives me the following error,

Microsoft VBScript compilation error '800a0400'

Expected statement

/registrationform.asp, line 143

End If
^

'SEND MAIL
Set Mailer = Server.CreateObject("SMTPsvg.Mailer"
Mailer.RemoteHost = "Mail server address"
Mailer.FromName = "website address"
Mailer.FromAddress = " "
Mailer.AddCC "Web Master", ""
Mailer.AddRecipient Request.Form("strFirstName" & Request.Form("strLastName", Request.Form("strEmail"
Mailer.Subject = "*****
Mailer.BodyText = "Welcome!" & Request.Form("strFirstName" & Request.Form("strLastName" & VbCrLf & "This message is to notify you are registered :" & VbCrLf & "Firstname:" & Request.Form("strFirstName" & VbCrLf & "Password:" & Request.Form("strPassword" & VbCrLf & " ***" & VbCrLf & "To Log In to your new account simply click on the URL below:" & VbCrLf & " myLoginpage.com"
if Mailer.SendMail then
Response.Redirect "thankyouform.asp"
else
end if
strError = "Unknown"
else
end if
Response.Write "Mail send failure. Error was " & Mailer.Response
end if




If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
End If
End IF
%>

Can some one help me with this code or give me guidance on mail script for an ASP form.

Thank you.

Replies

Replied 18 Apr 2007 21:18:21
18 Apr 2007 21:18:21 Dick Medema replied:
Hi Hiran,

There must be a dubbel qoute behind Mailer.Subject = "*****

Like this:

Mailer.Subject = "*****"

Grtzzz
From Holland
Replied 19 Apr 2007 20:58:21
19 Apr 2007 20:58:21 h b replied:
Is there any other formmail script that I could you? Data filled by the user gets inserted into access db, but it does not send email to user or the webmaster. Can anyone give your suggestions or links for mail scripts for ASP? thank you.

Hiran
Replied 20 Apr 2007 17:31:09
20 Apr 2007 17:31:09 Dick Medema replied:
Hi Hiran,
What kind of a mail component is there on your Internet site server, I have here a free asp e-mail script with CDONTS, if your server used CDONTS then you can used them.

Reply to this topic