Por favor Ingresar o Registrar

Base de Conocimientos - FAQs

Como envio correo con Jmail?

Este ejemplo le muestra como hacerlo Ud puede añadir todos los elementos en un formulario
<%
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "smtp.tuservidor.com"
JMail.Sender = "tu_email@dominio.com"
JMail.Subject = "asunto"
JMail.AddRecipient "para@dominio.com"
JMail.Body = "Este seria tu mensaje"
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
%>
*******************************************************************************************************

Otro  HTMLjmail

<%@LANGUAGE="VBSCRIPT" %>
<HTML>
<BODY>
<%
Set jmail = Server.CreateObject("JMail.Message")

jmail.AddRecipient "myRecipient@hisdomain.com", "Mr.Example"
jmail.From = "me@mydomain.com"

jmail.Subject = "Here's some graphics!"
jmail.Body = "A nice picture if you can read HTML-mail."

' The return value of AddAttachment is used as a
' reference to the image in the HTMLBody.

contentId = jmail.AddAttachment("c:\myCoolPicture.gif")

' As only HTML formatted emails can contain inline images
' we use HTMLBody and appendHTML

jmail.HTMLBody = "<html><body><font color=""red"">Hi, here is a nice picture:</font><br>"
jmail.appendHTML "<img src=""cid:" & contentId & """>"
jmail.appendHTML "<br><br>good one huh?</body></html>"

' But as not all mailreaders are capable of showing HTML emails
' we will also add a standard text body

jmail.Body = "Too bad you can't read HTML-mail."
jmail.appendText " There would have been a nice picture for you"

jmail.Send( "mailserver.mydomain.com" )
%>
Email sent! </BODY>
</HTML>


¿Fue útil la respuesta?

Agregar a Favoritos Agregar a Favoritos

Imprimir éste Artículo Imprimir éste Artículo

Leer también

Idioma:

Accesos directos

Login

Email

Contraseña

Recordar Datos de Usuario

Buscar



Síganos en Twitter