1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
var WActX_Outlook = new ActiveXObject('Outlook.Application');
var WNameSpace = WActX_Outlook.getNameSpace('MAPI');
WNameSpace.logon('','',true,false);
var WMail = WActX_Outlook.CreateItem(0);
WMail.Recipients.Add(WDestinataire);
WMail.cc = P_Destinataire2;
WMail.bcc = P_CopieCachee;
WMail.Importance = 2;
WMail.Subject = WObjet;
WMail.Body = WCorps;
if (P_PieceJointe == "PJ")
{
i = 0;
WTotLig = window.Form_MAJ.Liste_PDF.length - 1;
while (i <= WTotLig)
{
WFichier = window.Form_MAJ.Liste_PDF.item(i).value;
WMail.Attachments.Add(G_Actx.GetFile(WFichier).Path,1,WCorps.length+i+1, G_Actx.GetFile(WFichier).Name);
i = i + 1;
};
};
WMail.Send();
WNameSpace.logoff(); |
Partager