J'ai un script qui envoi automatiquement un email avec un lien qui pointe sur un fichier PDF
Si le nom du fichier PDF contient un apostophe, ça ne fonctionne pas.
pour créer le email, j'utilise CDO
Voici mon code
On error resume next
Server.ScriptTimeOut = 180
Set confirmation1 = Server.CreateObject("CDO.Message")
confirmation1.To = M_EmailF
confirmation1.From = "info@forintek.ca"
confirmation1.cc = "cp@micro-foret.com" & ";" & M_Email
confirmation1.Subject = M_SubjectEmailF
M_BodyTxt5 = "<span>Bonjour,<BR>"
M_BodyTxt5 = M_BodyTxt5&"Nous vous transmettons le " & M_SubjectEmailF & " pour le projet numéro " & M_NoPrj & ", " & M_TitrePrjF & "<BR>"
M_BodyTxt5 = M_BodyTxt5&"Pour accéder au document, veuillez cliquer sur le lien suivant <BR><BR>"
M_BodyTxt5 = M_BodyTxt5&"<a href=" & M_Lien & ">" & M_FichierDocument & "</a></span><BR><BR>"
M_BodyTxt5 = M_BodyTxt5&"Nous demeurons disponibles pour répondre à vos questions <BR>"
M_BodyTxt5 = M_BodyTxt5&"Bonne journée! <BR><BR>"
M_BodyTxt5 = M_BodyTxt5&M_ChargeProjet & "<BR>"
M_BodyTxt5 = M_BodyTxt5&M_EmailChargeProjet & "<BR>"
confirmation1.HTMLBody = M_BodyTxt5