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

Enviar E-Mail = Error 550...

Estas en el tema de Enviar E-Mail = Error 550... en el foro de ASP Clásico en Foros del Web. Muy buenas. Les comento que tengo un problema al querer enviar datos de un pequeño formulario a través de ASP. Estuve mirando el foro completo ...
  #1 (permalink)  
Antiguo 02/04/2006, 21:14
Avatar de Hayi  
Fecha de Ingreso: febrero-2002
Ubicación: Santa Fe - Santa Fe
Mensajes: 121
Antigüedad: 23 años, 1 mes
Puntos: 3
Pregunta Enviar E-Mail = Error 550...

Muy buenas. Les comento que tengo un problema al querer enviar datos de un pequeño formulario a través de ASP. Estuve mirando el foro completo y busqué información en Internet también. Me dijeron que el código que uso está correcto, paso a escribirlo:

formulario.html

<HTML>
<HEAD>
<TITLE>Formulario</TITLE>
</HEAD>
<BODY>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="80%" ALIGN="center" BORDER="1">
<TBODY>
<TR>
<TD><BR>
<FORM METHOD="post" ACTION="envio.asp" NAME="Formulario">
<P ALIGN="center">
<B>Nombre: </B><INPUT TYPE="text" NAME="nombre" SIZE="50">
</P>
<P Align="center">
<B>Apellido: </B><INPUT TYPE="text" NAME="apellido" SIZE="10">
</P>
<P ALIGN="center">
<B>Comentarios: </B><BR>
<TEXTAREA NAME="comenta" ROWS="5" COLS="50"></TEXTAREA>
</P>
<P ALIGN="center">
<INPUT TYPE="submit" VALUE="Enviar">
&nbsp;&nbsp;
<INPUT type="reset" VALUE="Borrar">
<P></P>
</FORM>
</TD>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>




--------------------

envio.asp

<%
De = Request.Form("apellido")
Para = "[email protected]"
Asunto = "Asunto..."

Set jMail = Server.CreateObject("CDONTS.NewMail")

jMail.From = De
jMail.AddAddress Para
jMail.Subject= Asunto
jMail.IsHTML = True
jMail.Body = "<html><head><title>Página</title><style>body { font-size:11pt; font-family:garamond, arial;}</style></head>
<body bgcolor="#FFFFFF" text="#000000"><p><strong>Elección generada desde...</strong></p><h3><strong>Datos:</strong></h3><table border=3 cellspacing=1 cellpadding=6 bordercolor=#000000><tr><td>Apellido</td><td>" & apellido & "</td></tr><tr><td>Nombre</td><td>" & nombre & "</td></tr></table><br><br><h3><strong>Comentarios...</strong></h3><ta ble border=3 cellspacing=1 cellpadding=6 bordercolor=#000000><tr><td>" & comenta & "</td></tr></table></body></html>"

jMail.Send

Set jMail = Nothing
%>

<html>
<head>
<title>Página</title>
<meta http-equiv="Refresh" content="5; url=index.html">
</head>

<body>
<br><br>
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tbody>
<tr>
<td align="center">Datos..</td>
</tr>
</tbody>
</table>
<br>
<br>
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tbody>
<tr>
<td class="letra5" align="center">En 5 segundos regresa a la página de origen...</td>
</tr>
</tbody>
</table>
</body>
</html>




El tema es que cuando realizo el envío, el servidor me devuelve "HTTP 500 - Error interno del servidor ". Estoy probando unas páginas en ********.com y es ahí dónde me tira ese error. Consulté con la mesa de ayuda y lo único que me respondieron fue con un código que me dicen que funciona muy bien pero que no tengo idea como implementarlo a lo que yo ya tengo:

<%@LANGUAGE=&quot;VBSCRIPT&quot; %>

<%
'on error resume next

'Envia el mail.
Set oMail = Server.CreateObject(&quot;CDO.Message&quot;)
Set iConf = Server.CreateObject(&quot;CDO.Configuration&quot;)
Set Flds = iConf.Fields

'Local service (dont change)

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /sendus
ing&quot;) = 1

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /smtpse
rver&quot;) = &quot;http://127.0.0.1&quot;

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /smtpco
nnectiontimeout&quot;) = 10

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /smtpse
rverport&quot;) = 25

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /sendus
ername&quot;) = &quot;&quot; 'usuario smtp

iConf.Fields.Item(&quot;http://schemas.microsoft.com/cdo/configuration /sendpa
ssword&quot;) = &quot;&quot; 'password para STMP

iConf.Fields.Update

Set oMail.Configuration = iConf

oMail.To = recipients
oMail.From = &quot;&quot; 'mail desde donde envia
oMail.Subject = subject
oMail.TextBody = Body
oMail.Send
Set iConf = Nothing
Set Flds = Nothing
%>




Gracias desde ya...
  #2 (permalink)  
Antiguo 03/04/2006, 11:15
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 1 mes
Puntos: 535
Ojo que donde dice &quot; en ese código en su lugar debe de haber una comilla "
__________________
...___...
  #3 (permalink)  
Antiguo 03/04/2006, 16:00
 
Fecha de Ingreso: agosto-2005
Mensajes: 9
Antigüedad: 19 años, 7 meses
Puntos: 0
De acuerdo .

El código debería ser solo esto:

de="[email protected]"
para1="[email protected]"
para2="[email protected]"
para3="[email protected]"
asunto="Coloca aqui el asunto"
fecha=date
nombre=request.form("nombre")
telefono=request.form("telefonos")

HTML = HTML & "algun texto descriptivo"&"<br>"
HTML = HTML & "El nombre del funcionario es : <b>"& nombre &"</b><br>"
HTML = HTML & "Teléfonos : <b>"& telefono &"</b><br>"
HTML = HTML & "Este correo ha sido generado automáticamente, no response este mail..."&"<br>"

copias=para1&";"&para2&";"&para3

Set myMail = Server.CreateObject( "CDONTS.Newmail" )
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.From = de
myMail.To = copias
myMail.Subject = Asunto
myMail.Body = HTML
myMail.Send
Set myMail = Nothing

esto deberia ser suficiente para que te funcione, si el error persiste, verifica que tengas permiso en el servidor para enviar SMTP y que el SMTP del servidor este activo.

Atte.
Foxleonardo
[email protected]
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 07:06.