Enrico,
Below is the code for doing a letterhead in Outlook Express (tested and working). I do not have a copy of Outlook installed here to create a test for Outlook.
The code is nothing special. You just specify the HTM file and do NOT include a message. I think the file extension must be HTM not HTML, if I remember correctly.
As per the note below, the entire HTML file must be built using FW code--including the salutation, message, and signature of the sender (if you want fully automated emails). The HTML file I used is similar to the one I previously posted.
Creating the HTML file shouldn't be too difficult. You could just store it in several pieces each in a separate file, then load all the pieces and paste them together with the saluation, message, and signature, pasted in the appropriate places. Then save it as a temp file and send. I would use a timer to then delete the temp file after a short delay.
If you want the HTM and JPG files also, let me know and I will email them to you.
James
// Purpose: Demonstrate the creation of a letterhead email.
// Author: James Bott
/* Note: You have to create the .HTM file using FW code--you can't just pass
a message. The message has to be already in the HTML code.
*/
#include "fivewin.ch"
#include "mail.ch"
function main()
local oMail,cMsg,cTo,cAddress,cSubject
cTo:="James Bott"
cSubject:="Test letterhead mail"
DEFINE MAIL oMail ;
SUBJECT OemToAnsi(cSubject) ;
TO cTo, cAddress;
FILES "c:\fw\mapisend\lhead.htm","lhead.htm";
FROM USER
ACTIVATE MAIL oMail
IF oMail:nRetCode#0
MsgAlert("The message could not be sent!","Error " + alltrim(cValToChar(oMail:nRetCode#0)) )
ELSE
//MsgInfo("Message sent successfully!")
ENDIF
return nil