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

Enviar HTML en e-mail con AspEmail o CDONTS

Estas en el tema de Enviar HTML en e-mail con AspEmail o CDONTS en el foro de ASP Clásico en Foros del Web. Perdonad, no me he dado cuenta de añadirlo en el mensaje de un poquito más abajo. También podría hacerlo usando :CDONTS. Agradezco cualquier sugerencia. Muchas ...
  #1 (permalink)  
Antiguo 15/11/2002, 17:14
 
Fecha de Ingreso: noviembre-2002
Mensajes: 5
Antigüedad: 22 años, 6 meses
Puntos: 0
Enviar HTML en e-mail con AspEmail o CDONTS

Perdonad, no me he dado cuenta de añadirlo en el mensaje de un poquito más abajo. También podría hacerlo usando :CDONTS.
Agradezco cualquier sugerencia.
Muchas gracias.
Juanjo
  #2 (permalink)  
Antiguo 21/11/2002, 02:14
Avatar de Avelar  
Fecha de Ingreso: noviembre-2002
Ubicación: Ensenada, Baja California, México
Mensajes: 673
Antigüedad: 22 años, 5 meses
Puntos: 1
¿Qué pex?

Bueno, no entiendo bien tu pregunta, pero si lo que quieres es darle formato a tu EMail que envías con el CDONTS únicamente supón que el .body indica que el texto que le asignes es como si estuviera entre las etiquetas <BODY> y </BODY> del HTML, así que puedes comenzar a utilizar código HTML ahí mismo.
__________________
Ariel Avelar
  #3 (permalink)  
Antiguo 21/11/2002, 05:01
Avatar de TomaHawkk  
Fecha de Ingreso: diciembre-2001
Ubicación: España
Mensajes: 422
Antigüedad: 23 años, 5 meses
Puntos: 1
Enviar un e-mail en formato HTML utilizando CDONTS

<%
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")

'//these are all the images that are in this message.
'//you must include them like this.
'//please note that you DO NOT have TO write the
'//entire file path in the <IMG> tag in the body after this.
'//make sure you see the image name after the path separated by a comma

objMail.AttachURL "D:\images\myImage.gif", "myImage.gif"
objMail.AttachURL "D:\images\myImage2.gif", "myImage2.gif"


HTML = HTML & "<HTML>"
HTML = HTML & "<HEAD>"
HTML = HTML & "<TITLE>Send Mail with HTML</TITLE>"
HTML = HTML & "</HEAD>"
HTML = HTML & "<BODY bgcolor=""lightyellow"">"
HTML = HTML & "<TABLE cellpadding=""4"">"
HTML = HTML & "<TR><TH><FONT color=""darkblue"" SIZE=""4"">"
HTML = HTML & now() & " - "
HTML = HTML & "These are all great ASP Sites</FONT></TH></TR>"
HTML = HTML & "<TR><TD>"
HTML = HTML & "<A HREF=""http://www.4guysfromrolla.com"">"
HTML = HTML & "<IMG SRC=""myImage.gif""></A><BR><BR>"
HTML = HTML & "<A HREF=""http://www.4guysfromrolla.com"">"
HTML = HTML & "<IMG SRC=""myImage2.gif""></A><BR><BR>"
HTML = HTML & "</FONT></TD></TR></TABLE><BR><BR>"
HTML = HTML & "</BODY>"
HTML = HTML & "</HTML>"

objMail.From = "[email protected]"
objMail.Subject = "Your daily HTML Mail"

'you need TO add these lines FOR the mail
'to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.To = "[email protected]
objMail.Body = HTML
objMail.Send

Response.write("Mail was Sent")
set objMail = nothing
%>

Saludos.
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 12:06.