Envoie mail …

Lien outlook différent …

void reportSendMail(PrintJobSettings p1)
{
    SysINetMail m = new SysINetMail();

    str         fileName = 'axaptareport';
    str         fileNameComplete;
    str         filePath;
    str         fileNameTmp;
    str         fileExtension;

    ;
    if (p1.format() == PrintFormat::ASCII)
    {
        fileName = fileName + '.txt';
    }
    else if (p1.format() == PrintFormat::RTF)
    {
        fileName = fileName + '.rtf';
    }
    else if (p1.format() == PrintFormat::HTML)
    {
        fileName = fileName + '.htm';
    }
    else if (p1.format() == PrintFormat::PDF
         || p1.format() == PrintFormat::PDF_EMBED_FONTS)
    {
        fileName = fileName + '.pdf';
    }
    
    //Récupération des informations du fichier AXTE.TMP.
    [filePath, fileNameTmp, fileExtension] = fileNameSplit(p1.fileName());

    //Création du nouveau Path pour le rapport (axaptareport.pdf)
    fileNameComplete = filePath + fileName;

    //Copy du fichier AXTE.TMP vers le fichier axaptareport.pdf
    WINAPI::copyFile(p1.fileName(), fileNameComplete);

    SmmOutlookEmail::constructEMail(smmSaveCopyOfEMail::No,             //Save Email
                                    0,                                  //TableId
                                    0,                                  //RecId
                                    p1.mailTo(),                        //Mail TO
                                    "",                                 //Email group Id
                                    fileNameComplete,                   //Attach file
                                    p1.mailSubject(),                   //Subject
                                    "",                                 //Body
                                    "",                                 //CampaignId
                                    smmEMailSMS::EMail,
                                    smmDisplayEMailInOutlook::Yes,
                                    true,                               //isHtml
                                    p1.mailCc()                         //Mail CC
                                    );
}
Advertisements