Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/05/2005, 17:55
Avatar de trasgukabi
trasgukabi
 
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 19 años, 8 meses
Puntos: 18
Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
Dim strTo, strSubject, strBody
Dim objCDOMail

strTo = "[email protected]"
strSubject = "Contacto Compra Vía WEB"

strBody = "Nombre: " & Request.Form("nombre")
strBody = strBody & vbCrLf
strBody = strBody & "Dirección: " & Request.Form("direccion")
strBody = strBody & vbCrLf
strBody = strBody & "Teléfono: " & Request.Form("tel")
strBody = strBody & vbCrLf
strBody = strBody & "e-mail: "Request.Form("mail")
strBody = strBody & vbCrLf
strBody = strBody & "Código del Producto: "Request.Form("codigo")
strBody = strBody & vbCrLf & vbCrLf
strBody = strBody & "Otras Indicaciones: "Request.Form("texto")

Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = strSubject 
objMessage.Sender = request.form("email")
objMessage.To = "[email protected]"
objMessage.HTMLBody =strBody
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
'también puedes borrar la línea de SMTP si pones sendusing=1
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
 objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
 objMessage.Configuration.Fields.Update

objMessage.Send
set objmessage=nothing