Tema: Mandar mail
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/11/2007, 12:21
Trutxof
 
Fecha de Ingreso: agosto-2006
Mensajes: 191
Antigüedad: 18 años, 9 meses
Puntos: 3
Re: Mandar mail

Hola, gracias por responder. Ahi va el codigo.

Código HTML:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> 
<% 
'MANDAR POR MAIL 
producto=request.querystring("producto") 
Set Mail = Server.CreateObject("Persits.MailSender") 
mail.username="miusuario" 
mail.password="mipass" 
Mail.Host = "smtp.mihost" 
Mail.From = "emailcliente" 
Mail.AddAddress "miemail" 
Mail.Subject = "loquesea" 
cuerpo = "<html>"&chr(10)&_ 
"<head>"&chr(10)&_ 
"<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"&chr(10)&_ 
"<title>Titulo</title>"&chr(10)&_ 
"</head>" & _ 
"<body style='margin:0px;background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:12px;color:#000000'>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div>Mensaje recibido de " & request.form("opcion") & " <b> " & Request.Form("nombre") & "</b>" & " interesandose por el siguiente producto: <b>" & producto & " </b>" & "<div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div> <b> Su telefono: </b>" & Request.Form("telef") & "</div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div> <b> Su email: </b>" & Request.Form("email") & "</div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div> <b> Su opinión y/o dudas: </b>" & "</div>"&chr(10)&_ 
"<div>" & Request.Form("comentarios") & "</div>"&chr(10)&_ 
"<div style='height:2em; '></div>"&chr(10)&_ 
"</body>" & _ 
"</html>" 
 
Mail.Body = cuerpo 
Mail.IsHTML = True 
Mail.SendToQueue 
 
'mail para el cliente 
copia=request.form("opcion2") 
if copia = 1 then 
 
Mail.AddAddress Request.Form("email") 
Mail.Subject = "loquesea" 
cuerpo = "<html>"&chr(10)&_ 
"<head>"&chr(10)&_ 
"<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"&chr(10)&_ 
"<title>el titulo</title>"&chr(10)&_ 
"</head>" & _ 
"<body style='margin:0px;background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:12px;color:#000000'>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div>Hemos recibido su mensaje interesandose por el siguiente producto: " & "<b>" & producto & "</b>" & "<div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div> En breve nos pondremos en contacto con usted." & "</div>"&chr(10)&_ 
"<div style='height:1em; '></div>"&chr(10)&_ 
"<div> Gracias por elegir nuestros servicios" & "</div>"&chr(10)&_ 
"<div style='height:2em; '></div>"&chr(10)&_ 
"</body>" & _ 
"</html>" 
 
Mail.Body = cuerpo 
Mail.IsHTML = True' 
Mail.SendToQueue 
end if 
 
Response.Redirect("index.asp") 
 
%>
 
Todo va bien excepto que a la primera dirección de email (mi cliente), le llegan los dos. El suyo y el que va dirigido al cliente. Ala segunda (el cliente de mi cliente) va bien.

Salu2
__________________
El mejor consejo lo da la experiencia, aunque este siempre llega tarde.
Cacharreando con Joomla

Última edición por Trutxof; 26/11/2007 a las 16:03