Using MAPI eMail without Preview

dekoforcedekoforce Germany
edited 6:30PM 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 6:30PM
    Hi ipong,

    thanks a lot! This works.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.