Note that there are some explanatory texts on larger screens.

plurals
  1. POSend Email in HTML Format
    primarykey
    data
    text
    <p>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.</p> <p>We would like to embelish the email and send it in an HTML format.<br> According to this link MSDN link MAPI is not sutiable for this <a href="http://support.microsoft.com/kb/268440" rel="nofollow noreferrer">http://support.microsoft.com/kb/268440</a></p> <p>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)</p> <pre><code>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; </code></pre> <p>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)</p> <p>Thanks</p> <p>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. </p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload