Current location: Hot Scripts Forums » Programming Languages » ASP » Set MailObj = Server.CreateObject ERROR

Set MailObj = Server.CreateObject ERROR

Reply
  #1 (permalink)  
Old 04-01-09, 12:28 PM
rootsandculture rootsandculture is offline
New Member
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Set MailObj = Server.CreateObject ERROR

Hi, i'm looking for help, i'm nor programmer, but i've got my old site which i want to put online again, but i'm getting error in the line 70 of this .asp when i complete data in formulary.

Quote:
Set MailObj = Server.CreateObject("CDONTS.NewMail")

This is the code:

Quote:
<%@ Language=VBScript %>
<% option explicit %>
<%
Response.Buffer = True
Response.Expires = -1441
%>

<% 'Definimos las variables
Dim MailObj
Dim varTo
Dim varSubject
Dim varBody
Dim varNombre
Dim varApellido
Dim varEmpresa
Dim varPuesto
Dim varDireccion
Dim varCiudad
Dim varProvincia
Dim varPais
Dim varEmail
Dim varTel
Dim varConsulta

'Llenamos las variables con contenido
varTo = "contact@rootsand.com"
varSubject = Request.Form("chkSubject")
varNombre = Request.Form("txtNombre")
varApellido = Request.Form("txtApellido")
varEmpresa = Request.Form("txtEmpresa")
varPuesto = Request.Form("txtPuesto")
varDireccion = Request.Form("txtDir")
varCiudad = Request.Form("txtCiudad")
varProvincia = Request.Form("txtProv")
varPais = Request.Form("txtPais")
varEmail = Request.form("txtEmail")
varTel = Request.Form("txtTel")
varConsulta = Request.Form("txtCons")

'Construimos el mensaje
varBody = varBody & "Mensaje enviado desde el sitio web"
varBody = varBody & chr(10)
varBody = varBody & "************************************************* ***"
varBody = varBody & chr(10)
varBody = varBody & "Nombre y Apellido: "& varNombre & varApellido
varBody = varBody & chr(10)
varBody = varBody & "Empresa: "& varEmpresa
varBody = varBody & chr(10)
varBody = varBody & "Puesto: "& varPuesto
varBody = varBody & chr(10)
varBody = varBody & "Direccion: "& varDireccion
varBody = varBody & chr(10)
varBody = varBody & "Ciudad: "& varCiudad
varBody = varBody & chr(10)
varBody = varBody & "Provincia: "& varProvincia
varBody = varBody & chr(10)
varBody = varBody & "Pais: "& varPais
varBody = varBody & chr(10)
varBody = varBody & "Email: "& varEmail
varBody = varBody & chr(10)
varBody = varBody & "Tel: "& varTel
varBody = varBody & chr(10) & chr(13)
varBody = varBody & "Mensaje"
varBody = varBody & chr(10)
varBody = varBody & "********************************************"
varBody = varBody & chr(10)
varBody = varBody & varConsulta

'Enviamos el mensaje
Set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.Send varEmail, varTo, varSubject, varBody

'Liberamos memoria en el servidor
Set MailObj = Nothing

'Redirigimos a la pagina de confirmacion
Response.Redirect "formulario.asp?Mode=Ok"
%>
Any help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-01-09, 02:07 PM
Merlotti Merlotti is offline
New Member
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not sure of you're To and From email addresses - assuming the T0 email address is varEmail (collected from Request.form("txtEmail")) and the From is "contact@rootsand.com"

To send the email try

Set MailObj= Server.CreateObject("CDONTS.NewMail")
MailObj.To = varEmail
MailObj.From = "contact@rootsand.com"
MailObj.Subject = varSubject
MailObj.Body = varBody

MailObj.Send
Set MailObj = nothing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-01-09, 02:40 PM
rootsandculture rootsandculture is offline
New Member
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
I get an error

Quote:
Microsoft VBScript runtime error '800a01b6'

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

/en/contact/script_formulario.asp, line 73
Line 73 is
Quote:
MailObj.Body = varBody
I tried deleting that line and is working fine, i get the messager " i'll contact soon .....etc" but the mail never arrives.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 04-03-09, 03:02 PM
webdevelopmenthouse webdevelopmenthouse is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
contact with your hosting.. and ask them if they are supporting CDONTS.. as CDONTS have been depricated... but if hosting peoples want, they can stills allow CDONTS..

try to use cdosys..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ and MSSQL tutorials? scott2500uk C/C++ 8 05-11-09 03:33 AM
Syntax Error Nikas Database 4 05-15-08 11:48 AM
Server.CreateObject Access Error dips ASP 4 12-31-07 04:57 AM
GRRR!!!! ERror help please! stormshadow PHP 4 12-06-06 09:05 PM
ASP upload prob minority ASP 1 06-27-05 09:35 AM


All times are GMT -5. The time now is 04:31 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.