Question:

ASP Server Side Programming Help

by  |  earlier

0 LIKES UnLike

I made an application 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 moderator. Here is the Code I used:

<

Set fromUser=Request.Form("username")

Set messageContent=Request.Form("usercomment...

Set email=CreateObject("CDO.Message")

email.Subject="Hilaal.org Comment"

email.From="info@hilaal.org"

email.To="raptor753@gmail.com"

email.HTMLBody="From: " fromUser "
" messageContent

SmtpMail.SmtpServer="email hilaal.org"

email.Send

Set email=Nothing

>

And this is the Error I keep Getting:

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/contactus.asp, line 26

Thank you for any help.

 Tags:

   Report

1 ANSWERS


  1. You can&#039;t &quot;createobject&quot; in ASP. This is VB syntax. You need to &quot;Server.Createobject&quot; in ASP because you want the web server to create the object.

    Here&#039;s some code for you

    Set objMailer=Server.CreateObject(&quot;CDO.Messa...

    strSender=&quot;you@me.com&quot;

    strRecipient=&quot;your@email.com&quot;

    mailserver = &quot;mail.yourserver.com&quot;

    objMailer.Subject = strSubject

    objMailer.From = strSender

    objMailer.To = strRecipient

    objMailer.HTMLBody = strMessage

    objMailer.Configuration.Fields.Item(&quot;h... = 2

    objMailer.Configuration.Fields.Item(&quot;h... = mailserver

    objMailer.Configuration.Fields.Item(&quot;h... = 25

    objMailer.Configuration.Fields.Update

    strResult = objMailer.Send

    set objmailer = nothing

    looks like yahoo cuts off the text. Go here

    http://fishcounts.com/cdomail.txt

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.