Ragazzi,
Sto avendo problemi nell'invio delle email quando nel campo mittente inserisco una parola con l'apostrofo esempio: Groupe D'Elite srl
Non mi compare nessun errore però non spedisce le email; se tolgo l'apostrofo invece tutto procede bene.
Posto il codice se mi aiutate mi fate una cortesia.
<%
Response.Expires=0
Response.Buffer = True
Server.ScriptTimeout = 20000
FUNCTION FixQuotes( theString )
FixQuotes = REPLACE( theString, "'", "'" )
END FUNCTION
data = Date()
mittente = Request("mittente")
emailmit = Request("emailmit")
oggetto = Request("oggetto")
filename = Request("filename")
testomail= Request("FCKeditor1")
testomail = Replace(testomail,"[data]","" & data &"")
allegato = Request("allegato")
lettura = Request("lettura")
function invioemail(email)
Set objMail = CreateObject("CDO.Message")
objMail.From ="" & (mittente) &"<"& emailmit &">"
objMail.To = "" & email &""
objMail.Subject = "" & oggetto &""
IF allegato <>"" then
objMail.AddAttachment (server.mappath("" & allegato &""))
end if
objMail.HTMLBody = ""& testomail &""
if lettura="SI" then
objMail.Fields(cdoDispositionNotificationTo) = "" & mittente &" <"& emailmit &">"
end if
objMail.Fields.Update()
objMail.Send()
Set objMail = Nothing
end function
Set FileObject=CreateObject("Scripting.FileSystemObjec t")
MioFile=Server.MapPath("/public/filevari/" & filename & "")
Set InStream=FileObject.OpenTextFile(MioFile,1,True)
totrec=0
%>
<%
Do While Not InStream.AtEndOfStream
totrec = totrec + 1
testo = InStream.ReadLine()
MioArray = Split (testo, "", -1, 1)
email = MioArray(0)
invioemail(email)
Response.Flush
Response.Write "" & totrec &". Email spedita con successo da: " & mittente &" a: " & email &"
"
Loop
InStream.Close
Set InStream=Nothing
Set FileObject=Nothing
Response.End
%>

Rispondi quotando
)