gerardobrien
03-08-2008, 07:19 PM
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
%>
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
%>