Search code examples
delphidelphi-2010email

Alternative Email rendering using delphi 2010


I have some problems with some customers, in my application I use Simple MAPI to render an email to outlook, but with some customer they have problems with the mail functions, I have the feeling that MAPI is not really a good way to render an email, so I have been starting to think if there are any alternative ways to render an email to send to the default email client.

I know for use a shellexecute mailt:[email protected] will work and applying &sbject="test" etc etc, but shellexecute is not really the way I want to do it either..

do I have any third option to render an email sending to the default mail client?

other than body I will also be needed to send with attachments as well

+some customers also use citrix distributed applications, which also need to be allowed to send emails


Solution

  • Based on two other articles on the web, I put together

    How can I simulate ‘Send To…’ with Delphi?

    It simulates the Explorer context menu item "Send to ... | Mail recipient" behavior. It will open a new message draft in the default mail client, with the selected file(s) already attached.

    It is very likely that it uses MAPI behind the scenes, but instead of using the API directly it uses the existing service of the operating system (which might solve the problem).