Errors Solutions
error

ASP Server Side Programming Help

Q: I made an attention for my web site it is supposed to be a contact us email. The page has a form that you fill out with comments and it gets emailed to the website chair. Here is the Code I used:

<
Set fromUser=Request.Form("username")
Set messageContent=Insist on.Form("usercomments")
Set email=CreateObject("CDO.Message")
email.Subdue="Hilaal.org Comment"
email.From="info@hilaal.org"
email.To="raptor753@gmail.com"
email.HTMLBody="From: " fromUser "<br />" messageContent
SmtpMail.SmtpServer="email hilaal.org"
email.Send
Set email=Nothing
>

And this is the Error I keep Getting:

Microsoft VBScript runtime error '800a01a8'
Interfere with required: ''
/contactus.asp, line 26

Thank you for any help.


A: You can't "createobject" in ASP. This is VB syntax. You poverty to "Server.Createobject" in ASP because you want the web server to create the object.


Here's some regulations for you


Set objMailer=Server.CreateObject("CDO.Message")

strSender="you@me.com"
strRecipient="your@email.com"

mailserver = "dispatch.yourserver.com"
objMailer.Subject = strSubject
objMailer.From = strSender
objMailer.To = strRecipient
objMailer.HTMLBody = strMessage
objMailer.Configuration.Fields.Memo("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMailer.Configuration.Fields.Matter("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailserver
objMailer.Configuration.Fields.Matter("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMailer.Configuration.Fields.Update
strResult = objMailer.Send

set objmailer = nothing

looks like yahoo cuts off the printed matter. Go here
http://fishcounts.com/cdomail.txt

© 2008 Errors Solutions