Foros del Web » Programando para Internet » ASP Clásico »

Enviar email con AspEmail

Estas en el tema de Enviar email con AspEmail en el foro de ASP Clásico en Foros del Web. Hola a Todos Le escribo para saber si me pueden ayudar a encontrar el error en mi codigo. Aclaración: Mi página web lo tengo alojado ...
  #1 (permalink)  
Antiguo 11/06/2010, 16:30
 
Fecha de Ingreso: marzo-2008
Ubicación: Posadas Misiones Argentina
Mensajes: 480
Antigüedad: 16 años, 1 mes
Puntos: 1
Enviar email con AspEmail

Hola a Todos

Le escribo para saber si me pueden ayudar a encontrar el error en mi codigo.
Aclaración: Mi página web lo tengo alojado gratis en brinkster.com.
El mensaje de error es el siguiente:

Cita:
De objeto de servidor de error 'ASP 0177: 800401f3'

Server.CreateObject

/ V / i / d / vidamisiones / contact_form.asp, la línea 23

800401f3
la linea 23 es:
Cita:
Set objEmail = Server.CreateObject("Persits.MailSender")
El código es:

Cita:
<%
posted = request.form ("submit")
if posted = "Submit" then

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''
'' Customize the following 5 lines with your own information. ''
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''
vtoaddress = "[email protected]" ' Change this to the email address you will be receiving your notices.
vmailhost = "mail.yahoo.com.ar" ' Change this to your actual Domain name.
vfromaddress = "[email protected]" ' Change this to the email address you will use to send and authenticate with.
vfrompwd = "22922965j" ' Change this to the above email addresses password.
vsubject = "ASP Contact Form" 'Change this to your own email message subject.


'''''''''''''''''''''''''''''''''''''''''''
'' DO NOT CHANGE ANYTHING PAST THIS LINE ''
'''''''''''''''''''''''''''''''''''''''''''
vfromname = request.form ("TName")
vbody = request.form ("TBody")
vrplyto = request.form ("TEmail")
vmsgbody = vfromname &"<br>"& vrplyto &"<br>"& vbody

Set objEmail = Server.CreateObject("Persits.MailSender")

objEmail.Username = vfromaddress
objEmail.Password = vfrompwd
objEmail.Host = vmailhost
objEmail.From = vfromaddress
objEmail.AddAddress vtoaddress
objEmail.Subject = vsubject
objEmail.Body = vmsgbody
objEmail.IsHTML = True
objEmail.Send

vErr = Err.Description
if vErr <> "" then
response.write vErr & "<br><br>There was an error on this page."
else
response.write "Thank you, your message has been sent."
End If
Set objEmail = Nothing

response.write "Thank you, your message has been sent."
end if
%>

<html><body>
<form name="SendEmail01" method="post">
<table border=0>
<tr>
<td>Name:</td>
<td><input type="text" name="TName" size="30"></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="TEmail" size="30"></td>
</tr>
<tr>
  #2 (permalink)  
Antiguo 12/06/2010, 04:37
Avatar de Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: Enviar email con AspEmail

Hola

Comprueba que componentes admite el servidor

Código ASP:
Ver original
  1. <&#37;
  2. Dim theComponent(5)
  3. Dim theComponentName(5)
  4.    
  5. theComponent(0) = "ADODB.Connection"
  6. theComponent(1) = "Scripting.FileSystemObject"
  7. theComponent(2) = "CDONTS.NewMail"
  8. theComponent(3) = "Persits.Upload.1"
  9. theComponent(4) = "CDO.Message"
  10.    
  11. theComponentName(0) = "ADODB"
  12. theComponentName(1) = "FileSystemObject"
  13. theComponentName(2) = "CDONTS"
  14. theComponentName(3) = "Persits Upload"
  15. theComponentName(4) = "CDOSYS"
  16.    
  17. Function IsObjInstalled(strClassString)
  18. On Error Resume Next
  19. IsObjInstalled = False
  20. Err = 0
  21. Dim xTestObj
  22. Set xTestObj = Server.CreateObject(strClassString)
  23. If 0 = Err Then IsObjInstalled = True
  24. Set xTestObj = Nothing
  25. Err = 0
  26. End Function
  27.  
  28.  
  29. Dim i
  30. For i=0 to UBound(theComponent)
  31. If Not IsObjInstalled(theComponent(i)) Then
  32. Else
  33. Response.Write "<tr>" & vbCrLf
  34. Response.Write "<td width=""100%"">" & vbCrLf
  35. Response.Write "<b>" & theComponentName(i) & "</b><br>" & vbCrLf
  36. Response.Write "</td>" & vbCrLf
  37. Response.Write "</tr>" & vbCrLf
  38. End If
  39. Next
  40. %>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />

Etiquetas: aspemail, email, enviar
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:43.