Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:15:37+00:00 2026-05-11T14:15:37+00:00

At the moment we are using MAPI to send a plain text email from

  • 0

At the moment we are using MAPI to send a plain text email from our application. We specify the dialog flag when the user invokes this function, so that the email will appear in their email client and they can then modify it and send it.

We would like to embelish the email and send it in an HTML format.
According to this link MSDN link MAPI is not sutiable for this http://support.microsoft.com/kb/268440

I have seen an article on ExpertsExchange that say you can use MAPI to do it but I can’t get the example to work with Outlook (not tried anyother client yet)

procedure ShowMailDlg(ToName,Address,HTMLMessage: string); var     li: integer;     lMessage: TMapiMessage;     lRecipArray: array of TMapiRecipDesc;     lREs: DWord; begin     SetLength(lRecipArray,1);     lRecipArray[0].ulRecipClass:=MAPI_TO;     lRecipArray[0].lpszName:=pChar(ToName);     lRecipArray[0].lpszAddress:=pChar(Address);     lMessage.ulReserved:=0;     lMessage.lpszSubject:=nil;     lMessage.lpszNoteText:=pChar(HTMLMessage);     lMessage.lpszMessageType:= nil;//pChar('HTML');     lMessage.lpszDateReceived:=nil;     lMessage.lpszConversationID:=nil;     lMessage.flFlags:=0;     lMessage.lpOriginator:=nil;     lMessage.nRecipCount:=length(lRecipArray);     lMessage.lpRecips:=PMapiRecipDesc(lRecipArray);     lMessage.nFileCount:=0;     lMessage.lpFiles:=PMapiFileDesc(nil);     lRes:=MapiSendMail(0, 0 , lMessage,MAPI_DIALOG, 0); end; 

Anyone have any ideas how I can do this. I could probably automate Outlook but I would like to keep it fairly independant of email client (hence MAPI)

Thanks

Update: thanks to everyone for the suggestions. The feature is question is not that heavily used, so asking the user to configure SMTP details is not really an option. I think we will just stick to the plain text email.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:15:38+00:00Added an answer on May 11, 2026 at 2:15 pm

    MAPI doesn’t support HTML formatted messages. From Microsoft : ‘Extended Messaging Application Programming Interface (MAPI) should not be used to generate HTML-formatted messages. As an alternative, consider using the Microsoft Outlook Object Model, CDONTS, CDOSYS, CDOEX, or a third-party SMTP control.’

    I would echo the comments about sending via Indy. I published a unit that works to send HTML messsages with Indy very simply here or feel free to write your own. If you really want to make the messages editable, try a combination of WPTools and Indy. WPTools has good support for HTML markup and then you can send the resulting message via Indy.

    I don’t have any experience with Synapse so I can’t say how easy/hard it is with that project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 81k
  • Answers 81k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's interesting for Wikipedia which intends to have all alternative… May 11, 2026 at 4:27 pm
  • Editorial Team
    Editorial Team added an answer From my investigations, it looks like zsh performs <> substitution… May 11, 2026 at 4:27 pm
  • Editorial Team
    Editorial Team added an answer declare @baseDate datetime set @baseDate = '1 May 2005' SELECT… May 11, 2026 at 4:27 pm

Related Questions

We are using the CString class throughout most of our code. However sometimes we
Our company is currently writing a GUI automation testing tool for compact framework applications.
Can anyone think of a good solution for getting IOC into a console application?
We're using TFS Build Server to ensure that all files checked in by developers

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.