Hi, If you change init method to set printjobsettings, can send 
attachment as HTML. Is this what you you mean?
if (salesFormLetter)
    {
        element.unpackPrintjobSettings
(salesFormLetter.printerSettingsFormLetter());
        // <== Modification Start SIG JJS 010808 Invoice Mail
        if (CustInvoiceJour.custTable_InvoiceAccount
().SIG_EmailSalesInvoice == NoYesCombo::Yes)
        {
            element.printJobSettings().mailTo(custTable::find
(CustInvoiceJour.InvoiceAccount, false).Email);
            element.printJobSettings().preferredMailFormat
(PrintFormat::HTML);
            element.printJobSettings().preferredTarget
(PrintMedium::Mail);
    }
else
    {
        element.unpackPrintjobSettings
(SalesFormLetter::getPrinterSettingsFormletter
(DocumentStatus::Invoice));
        element.printJobSettings().setTarget(PrintMedium::Screen);

        // <== Modification Start SIG JJS 010808 Invoice Mail
        if (CustInvoiceJour.custTable_InvoiceAccount
().SIG_EmailSalesInvoice == NoYesCombo::Yes)
        {
            element.printJobSettings().mailTo(custTable::find
(CustInvoiceJour.InvoiceAccount, false).Email);
            element.printJobSettings().preferredMailFormat
(PrintFormat::HTML);
            element.printJobSettings().preferredTarget
(PrintMedium::Mail);

            // <== Modification Start SIG JJS 240808 Invoice Mail 
Status
                    }

Steffan, i hope this helps, I have a problem how to automate this so 
printout is not shown and printer set up from does not have to 
trigger the email. Know can use the SysMailer class but that is 
getting tricky, is there a better solution?

--- In [email protected], "steffendenize" 
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> When using AX 4.0 build-in print management, I can automatically 
email
> e.g. invoices to customers, but how do I set the body of the email 
to
> be html and not 'non-formatted' text? And when I'm at it, how do I
> automatically add a signature to the outgoing email?
> 
> Best regards,
> Steffen
>


Reply via email to