Ver Mensaje Individual
  #119 (permalink)  
Antiguo 24/07/2005, 10:13
Avatar de El_Metallick
El_Metallick
 
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 5 meses
Puntos: 16
Sobre componentes para el envio de emails:Aquí les dejo un resumen de la codificación de los diversos componentes de envío de email.

Componente "CDONTS"
'Si lo usas en IIS (CDONTS object)
Código:
Set msMail = CreateObject("CDONTS.NewMail")
With msMail
.BodyFormat = 0 'Set to 0 for HTML email, 1 for plain text.
.MailFormat = 0 'Set to 0 for HTML email, 1 for plain text.
.To = strTo
.From = strFromName & " <" & strFromAddress & ">"
.Subject = strSubject
.Body = strMessage
.Send
End With
Componente "CDOSYS"
'Si lo usas en IIS's (CDO object):
Código:
Dim conf
Set conf = Server.CreateObject("CDO.Configuration")
With conf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Update 
End With
 
Set msMail = Server.CreateObject("CDO.Message")
With msMail
Set .Configuration = conf
.From = strFromName & " <" & strFromAddress & ">"
.To = strTo
.Subject = strSubject
.HTMLBody = strMessage
.Send
End With
Componente "AspMail"
'Si usas AspMail (http://www.serverobjects.com/)
Código:
Set msMail = Server.CreateObject("SMTPsvg.Mailer")
With msMail
.ContentType = "text/html"
.RemoteHost = strHost
.FromName = strFromName
.FromAddress = strFromAddress
.AddRecipient "", strTo
.Subject = strSubject
.BodyText = strMessage
.SendMail
End With
Componente "AspEmail"
'Si usas AspEmail 5.0 (http://www.aspemail.com/):
Código:
Set msMail = Server.CreateObject("Persits.MailSender")
With msMail
.Host = strHost
.From = strFromAddress
.FromName = strFromName
.AddAddress strTo
.Subject = strSubject
.Body = strMessage
.IsHTML = True
.Send
End With
Componente "Geocel"
'Si usas Geocel DevMailer 1.5 (http://www.geocel.com/):
Código:
Set msMail = Server.CreateObject("Geocel.Mailer")
With msMail
.AddServer strHost, 25
.FromAddress = strFromAddress
.FromName = strFromName
.AddRecipient strTo, ""
.Subject = strSubject
.Body = strMessage
.ContentType = "text/html"
.LogLevel = 4
.LogFile = "c:\temp\emailcoms\geocel.log"
.Send
End With
Componente "JMail"
'Si usas JMail (http://tech.dimac.net/)
Código:
Set msMail = Server.CreateOBject("JMail.Message")
With msMail
.From = strFromAddress
.FromName = strFromName
.AddRecipient strTo
.Subject = strSubject
.HTMLBody = strMessage
.Send(strHost)
End With
Componente "DynuEmail"
'Si usas DynuEmail (http://www.dynu.com/)
Código:
Set msMail = Server.CreateObject("Dynu.Email")
With msMail
.Host = strHost
.IsHTML = True
.From = strFromAddress
.FromName = strFromName
.AddAddress strTo
.Subject = strSubject
.Body = strMessage
.Send()
End With
Componente "EasyMail"
'Si usas EasyMail 5 (http://www.easymailobjects.com/)
Código:
Set msMail = Server.CreateObject("EasyMail.SMTP.5") 
With msMail
.MailServer = strHost
.BodyFormat = 1 'For HTML
.FromAddr = strFromAddress
.AddRecipient "", strTo, 1
.Subject = strSubject
.Send()
End With
Componente "SA-SMTPMail"
'Si usas SA-SMTPMAIL (http://www.aspstudio.com/)
Código:
Set msMail = Server.CreateObject("SoftArtisans.SMTPMail")
With msMail
.RemoteHost = strHost
.FromAddress = strFromAddress
.FromName = strFromName
.AddRecipient strTo
.Subject = strSubject
.HTMLText = strMessage
.Wordwrap = True
.SendMail
End With
Componente "ocxQmail"
'Si usas ocxQmail (http://www.flicks.com/ocxQmail)
Código:
Set msMail = Server.CreateObject("ocxQmail.ocxQmailCtrl.1") 
msMail.XHeader "Content-Type", "text/html; charset=""iso-8859-1"""
msMail.Q strHost, strFromName, strFromAddress, "", "", strTo, "", "", "", strSubject, strMessage
End Select
Saludos
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!