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

mandar un .html por aspmail o cdonts

Estas en el tema de mandar un .html por aspmail o cdonts en el foro de ASP Clásico en Foros del Web. Necesito que me expliquen como mandar mails con contenido .html...
  #1 (permalink)  
Antiguo 11/02/2002, 15:46
 
Fecha de Ingreso: diciembre-2001
Ubicación: Argentina
Mensajes: 132
Antigüedad: 22 años, 5 meses
Puntos: 0
mandar un .html por aspmail o cdonts

Necesito que me expliquen como mandar mails con contenido .html
  #2 (permalink)  
Antiguo 11/02/2002, 22:36
Avatar de Aston  
Fecha de Ingreso: mayo-2001
Ubicación: Madrid
Mensajes: 933
Antigüedad: 23 años, 1 mes
Puntos: 0
Re: mandar un .html por aspmail o cdonts

Hola, debes usar la propiedad BodyFormat de CDonts, te dejo la documentación:

BodyFormat Property (CDONTS NewMail Object)

The BodyFormat property sets the text format of the NewMail object. Write-only.

Syntax
objNewMail.BodyFormat

Data Type
Long

Remarks
BodyFormat can contain exactly one of the following values:

BodyFormat setting Value Description
CdoBodyFormatHTML 0 The Body property is to include Hypertext Markup Language (HTML).
CdoBodyFormatText 1 The Body property is to be exclusively in plain text (default value).


Example
This code fragment shows the usage of the BodyFormat property in preparing and sending an HTML message:

Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")

HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "HTML = HTML & ""content=""text/html; charset=iso-8859-1"">"""
HTML = HTML & "<title>Sample NewMail</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "This is a sample message being sent using HTML. <BR></body>"
HTML = HTML & "</html>"

myMail.From = "[email protected]"
myMail.To = "[email protected]"
myMail.Subject = "Sample Message"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
Set myMail = Nothing

Si necesitas el código completo para enviar un correo con CDonts, echa un vistazo a este mensaje dond ehe dejado el código completo y listo:

<a href='ir.asp?http://www.forosdelweb.com/mensaje.asp?id=62629' target='_blank'>http://www.forosdelweb.com/mensaje.asp?i...</a>

Espero te ayude, un saludo. :) ;) :P


<a href="http://www.laventanita.net/" target="_blank">
<img src="http://www.breogan.org/images/Aston.gif" border="0" alt="La Ventanita.net - Lo imprescindible en la red"></a>
  #3 (permalink)  
Antiguo 12/02/2002, 09:46
 
Fecha de Ingreso: diciembre-2001
Ubicación: Argentina
Mensajes: 132
Antigüedad: 22 años, 5 meses
Puntos: 0
Re: mandar un .html por aspmail o cdonts

Te agradesco mucho tu ayuda, pero tengo un problema, en el archivo .html hay imagenes y las tengo que mandar tambien. Como lo hago???

gracias
Juampi

juampi
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 21:09.