salve, ho fatto una funzione per inviare email :
----------------------------------------------------
function inviaEmail(invioDa,invioA,oggetto,testo,fileAllega to)
if isEmpty(invioDa) then
'invioDa = application("emailSito")
nomeDominio = Request.ServerVariables("HTTP_HOST")
dominio = split(nomeDominio,".")
invioDa = "info@"&dominio(1)&"."&dominio(2)
end if
cartella = Server.MapPath("/public/mailing")
on error resume next
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = application("smtp")
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update
html = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"" ""http://www.w3.org/TR/html4/loose.dtd"">"&VbCrLf&_
"<html lang=""it""> "&VbCrLf&_
"<head>"&VbCrLf&_
"<title>"&Request.ServerVariables("HTTP_HOST") &" - email</title>"&VbCrLf&_
"<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">"&VbCrLf&_
"</head>"&VbCrLf&_
"<body>"&VbCrLf&_
"<font style='font-size:14px;font-weight:bold'>"&oggetto&"</font>
"&VbCrLf&_
testo&VbCrLf
html = html&"</body></html>"
With iMsg
Set .Configuration = iConf
.To = invioA
.From = invioDa
if len(fileAllegato)> 0 then .AddAttachment (cartella & "\" & fileAllegato)
.Sender = nomeDominio
.Subject = oggetto
.htmlBody = html
'.CreateMHTMLBody "http://"&Request.ServerVariables("HTTP_HOST")&"/vbs/email/email.asp?testo="&server.URLEncode(testo)&"&oggett o="&server.URLEncode(oggetto)&"&dest="&server.URLE ncode(request("dest"))&"&invioA="&server.URLEncode (invioA)
.Send
End With
Set iMsg = nothing
Set iConf = nothing
Set Flds = nothing
end function
-------------------------------------------------------------
per utilizzarla semplicemente faccio :
inviaEmail invioDa,invioA,oggetto,testo,fileAllegato
-------------------------------------------------------------
il problema è però che non arriva a tutte le caselle email, come ad esempio su tiscali non arrivano le email inviate.
volevo sapere, se qualcuno di voi ha il mio stesso problema:
dipende dallo script o da qualche tipo di filtro che tiene il server che riceve la mail la macata ricezione da parte del destinatario?

Rispondi quotando