Código:
Pero tengo varios problemas:<%
function email(componente)
'componente = 0 Si el componente es CDONTS
'componente = 1 Si el componente es CDOSYS
'componente = 2 Si el componente es AspMail
'componente = 3 Si el componente es AspEmail
'componente = 4 Si el componente es Geocel
'componente = 5 Si el componente es JMail
'componente = 6 Si el componente es DynuEmail
'componente = 7 Si el componente es EasyMail
'componente = 8 Si el componente es SA-SMTPMail
'componente = 9 Si el componente es ocxQmail
Select Case componente
Case 0
Set msMail = CreateObject("CDONTS.NewMail")
With msMail
.BodyFormat = 0 '0 si es HTML y 1 si es texto plano.
.MailFormat = 0 '0 si es HTML y 1 si es texto plano.
.To = strPara
.From = strDe & " <" & strDeEmail & ">"
.Subject = strAsunto
.Body = strMensaje
.Send
End With
Case 1
Dim conf
Set conf = Server.CreateObject("CDO.Configuration")
With conf.Fields
.Item("http://schemas.microsoft.com/cdo/con...ion/smtpserver") = strHost
.Item("http://schemas.microsoft.com/cdo/con...smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/con...tion/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/con...nectiontimeout") = 60
.Update
End With
Set msMail = Server.CreateObject("CDO.Message")
With msMail
Set .Configuration = conf
.From = strDe & " <" & strDeEmail & ">"
.To = strPara
.Subject = strAsunto
.HTMLBody = strMensaje
.Send
End With
Case 2
Set msMail = Server.CreateObject("SMTPsvg.Mailer")
With msMail
.ContentType = "text/html"
.RemoteHost = strHost
.FromName = strDe
.FromAddress = strDeEmail
.AddRecipient "", strPara
.Subject = strAsunto
.BodyText = strMensaje
.SendMail
End With
Case 3
Set msMail = Server.CreateObject("Persits.MailSender")
With msMail
.Host = strHost
.From = strDeEmail
.FromName = strDe
.AddAddress strPara
.Subject = strAsunto
.Body = strMensaje
.IsHTML = True
.Send
End With
Case 4
Set msMail = Server.CreateObject("Geocel.Mailer")
With msMail
.AddServer strHost, 25
.FromAddress = strDeEmail
.FromName = strDe
.AddRecipient strPara, ""
.Subject = strAsunto
.Body = strMensaje
.ContentType = "text/html"
.LogLevel = 4
.LogFile = "c:\temp\emailcoms\geocel.log"
.Send
End With
Case 5
Set msMail = Server.CreateOBject("JMail.Message")
With msMail
.From = strDeEmail
.FromName = strDe
.AddRecipient strPara
.Subject = strAsunto
.HTMLBody = strMensaje
.Send(strHost)
End With
Case 6
Set msMail = Server.CreateObject("Dynu.Email")
With msMail
.Host = strHost
.IsHTML = True
.From = strDeEmail
.FromName = strDe
.AddAddress strPara
.Subject = strAsunto
.Body = strMensaje
.Send()
End With
Case 7
Set msMail = Server.CreateObject("EasyMail.SMTP.5")
With msMail
.MailServer = strHost
.BodyFormat = 1 'para HTML
.FromAddr = strDeEmail
.AddRecipient "", strPara, 1
.Subject = strAsunto
.Send()
End With
Case 8
Set msMail = Server.CreateObject("SoftArtisans.SMTPMail")
With msMail
.RemoteHost = strHost
.FromAddress = strDeEmail
.FromName = strDe
.AddRecipient strPara
.Subject = strAsunto
.HTMLText = strMensaje
.Wordwrap = True
.SendMail
End With
Case 9
Set msMail = Server.CreateObject("ocxQmail.ocxQmailCtrl.1")
msMail.XHeader "Content-Type", "text/html; charset=""iso-8859-1"""
msMail.Q strHost, strDe, strDeEmail, "", "", strPara, "", "", "", strAsunto, strMensaje
End Select
end function
%>
1.- Tengo windows 98 con PWS y no se si este soporta en envio de mails.
2.- No se si esta bien estructurada la funcion (pues es la primera funcion que hago yo mismo)
3.- Que le modificarian ustedes??
Bueno gracias de antemano y saludos

