Buenos dias encontre este codigo para enviar corres electronicos con asp clasico pero me sale un error que dice Error de transporte en la conexión al servidor.
este es el codigo les agradezco de antemano la ayuda.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Contacto</title>
</head>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD")="POST" Then
'ENVÍO DEL FORMULARIO DE CONTACTO
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2
'.Item(sch & "smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
.Item(sch & "smtpserver") = "localhost"
.Item(sch & "smtpserverport") = 25
.Item(sch & "smtpconnectiontimeout") = 40
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "sendusername") = "[email protected]"
.Item(sch & "sendpassword") = "carmenza8902"
.update
End With
Set MailObject = Server.CreateObject("CDO.Message")
Set MailObject.Configuration = cdoConfig
'MailObject.BodyFormat = 0
'MailObject.mailformat = 0
MailObject.From = "[email protected]"
MailObject.To = "[email protected]"
MailObject.Subject = "prueba"
Cuerpo = "Nombre: " & Request.Form("nombre") & "<br>"
Cuerpo = Cuerpo & "Email: " & Request.Form("email") & "<br>"
Cuerpo = Cuerpo & "Comentario: " & Request.Form("comentario") & "<br>"
MailObject.HTMLBody = Cuerpo
MailObject.Send
Set MailObject = Nothing
Set cdoConfig = Nothing
End If
%>
<form method="post" action="email_y.asp">
<table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Nombre:</td>
<td><input name="nombre" type="text" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="email" type="text" /></td>
</tr>
<tr>
<td valign="top">Comentario:</td>
<td><textarea name="comentario" cols="40" rows="5"> </textarea></td>
</tr>
<tr>
<td valign="top"></td>
<td><input name="Enviar" type="submit" value="Enviar" /></td>
</tr>
</table>
</form>
</body>
</html>