Bonjour et merci d'avance de l'attention que vous porterez à mon sujet,
Je dois envoyé un mail (newsletter), celui-ci est structuré sur du code HTML. Or pour pouvoir le passé à ma page PHP j'ai été obligé de le mettre dans une variable. Je voulais savoir si ce que j'avais fais était conforme car apparement quand j'envoi mon mail sa marche bien hormis qu'il est vide
1 2 3 4 5 6 7 8 9 10
| var bodyCorps = '<HTML><HEAD><TITLE>NewsLetter</TITLE><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'+
'<style type="text/css">'+
'*{padding: 0px;margin:0px;}hr{ visibility: hidden;}.image{ background: transparent url(\'cid:ENTETE.gif\') no-repeat top center;height:200px;padding-right:8px;padding-top: 90px;}'+
'.bordureDuHaut{background: transparent url(\'cid:BORDURE_haut.gif\') no-repeat top;height:6px;}.fond{background: transparent url(\'cid:FOND_1px.gif\') top;height:569px;font-family:calibri,cambria,arial,candara;color :#000099;}'+
'p{text-align: center;}#texte{padding-left:20px;font-size:130%;}#texteScrollable{position: relative ;width:800 ;height:569;overflow :auto ;font-size: 10pt;}'+
'.bordureDuBas{background: transparent url(\'cid:BORDURE_bas.gif\') no-repeat top;height:6px;}.finDuFond{background: transparent url(\'cid:FOND_1px.gif\') top;height:6px;}'+
'#bouton_send{text-align: center;width:100%;}.logoAirbus{float:right;width:100px;background:white url(\'cid:LOGO_AIRBUS.gif\') no-repeat;height: 24px;}'+
'</style></HEAD><BODY><div class="image"><div align="bottom" class="logoAirbus" ></div></div><div class="fond" id="texteScrollable"><div class="bordureDuHaut">'+
'</div> <div id="texte"><p><b>Dear all,</b></p>'
'</div></div><form method=post action="test.php"><div class="finDuFond"><div class="bordureDuBas"></div></div></form></BODY></HTML>' |
Je le passe de la façon suivante :
document.getElementById('Body').value = bodyCorps;
Partager