Results 1 to 4 of 4

Thread: ASP Email Script Problem:(

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy ASP Email Script Problem:(

    hi there, i pretty new to ASP and trying to learn it as i go along, i'm having some trouble with the following email script. This is the error thats showing up: Anyone any ideas?



    Microsoft VBScript runtime error '800a01b6'

    Object doesn't support this property or method: 'Body'

    /gerardob/contactconfirmation.asp, line 56



    <%

    Dim objEmail, sName, sEmail, sSubkject, sMessage, sAnswer, sMyMail

    sMyMail="obrien.g@gmail.com"

    'get form data
    sName = request.Form("name")
    sEmail = request.Form("email")
    sSubject = request.Form("subject")
    sMessage = "Message from form:" & Chr(13) & Chr(10) & Chr(10) & "Name : " & sName & Chr(13) & Chr(10) & Chr(10) & request.Form("message")

    'you can modify the text into whatever you want
    sAnswer="Dear " & sName & Chr(13) & Chr(10) & Chr(10)
    sAnswer=sAnswer & "Thank you for filling out the form on our website." & Chr(13) & Chr(10)
    sAnswer=sAnswer & "We will contact you as soon as possible concerning your matters." & Chr(13) & Chr(10) & Chr(10)
    sAnswer=sAnswer & "Kind regards," & Chr(13) & Chr(10) & "Manager (CaledonianKeady.com)"

    'Form mailed to you
    Set objEmail = CreateObject("CDO.Message")
    objEmail.From = sEmail
    objEmail.To = sMyMail
    objEmail.Subject = sSubject
    objEmail.Body = sMessage
    objEmail.Send
    set objEmail=nothing




    'A confirmation sent to the customer/client/whoeveR

    Set objEmail = CreateObject("CDO.Message")
    objEmail.From = sMyMail
    objEmail.To = sEmail
    objEmail.Subject = "Re: " & sSubject
    objEmail.Body = sAnswer
    objEmail.Send
    set objEmail=nothing
    %>

  2. #2
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    if u want dotnet code click following link

    http://dotnetclassic.com/post/Send-E...h-Asp-Net.aspx

  3. #3
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Swap
    Code:
    ...
    objEmail.Body = sMessage
    ...
    objEmail.Body = sAnswer
    For
    Code:
    ...
    objEmail.TextBody = sMessage
    ...
    objEmail.TextBody = sAnswer
    And see how you go.

  4. #4
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    um... i may be wrong but look at this

    Dim objEmail, sName, sEmail, sSubkject, sMessage, sAnswer, sMyMail

    and now look at this

    sSubject = request.Form("subject")

    Your missing the "k"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •