Reply To: TRzSendMessage

#343
Ray Konopka
Keymaster

    Hi Randall,

    The TRzSendMessage component uses the Simple Messaging API (MAPI). As a result, Microsoft does have some information on MAPI. One interesting issue that was recently reported regarding TRzSendMessage was an application built with Delphi 2007 but was running on a 64-bit OS with a 32-bit version of Outlook. There is an interesting page from Microsoft that talks about the bitness of MAPI applications and the operating systems they are running on. The link is:

    https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/building-mapi-applications-on-32-bit-and-64-bit-platforms

    Perhaps this is what you are running into.

    Back to Simple MAPI. It really is a pretty simple interface and does rely on having an email client installed on the system. The component was originally created to facilitate applying for the Windows 95 Logo for an app. There are two big issues with Simple MAPI: 1) not all email clients support it the same way, and 2) when things go wrong, the errors returned from MAPI are notoriously vague–the most infamous being ErrorCode 2 – General Error.

    As an alternative, you may wish to consider sending emails from you app using the TIdSMTP component. An email client is not necessary for this component to send emails. However, you do need to specify an SMTP server to actually send the email messages.

    Ray