Using MAPI eMail without Preview

dekoforcedekoforce Germany
edited 8:56AM in FastReport .NET
Hi,

i??m trying to send email with the MAPI functionality.
FastReport.Utils.Config.EmailSettings.UseMAPI = True

It works fine when using the report.show function. But i want FastReport to open a new eMail (from Thunderbird) attached with the report as PDF.
Also it would be fine to add Address, Subject and Message Text programmatically.

Every code snipped i??ve found work??s only without MAPI in SMTP mode.

Any idea?

Comments

  • edited April 2019
    FastReport.Export.Email.MAPI.SendMail(IntPtr handle, string[] files, string mailSubject, string mailBody, string[] recipentName, string[] recipientAddress)


    Try this in your form:
    IntPtr handle = this.Handle;

    It will return the handle of the form and pass it to MAPI.SendMail
  • dekoforcedekoforce Germany
    edited 8:56AM
    Hi ipong,

    thanks a lot! This works.

Leave a Comment