How to create mail message + attachment
Hi All,
How can I create a mail message including a subject, a msg content and an
attachment?
I'm currently using the code below, but that does not seem to accept content
and attachments.
Thanks in advance,
Gerrit Beuze
ModelMaker Tools
procedure SendMail(const Address, Subject: string);
var
R: HInst;
begin
R := ShellExecute(0, // handle to parent window
nil, // pointer to string that specifies operation to
perform
PChar(Format('mailto:%s?subject=%s', [Address,
Subject])), // pointer to filename or folder name string
'', // pointer to string that specifies executable-file
parameters
nil, // pointer to string that specifies default
directory
SW_SHOWNORMAL); // whether file is shown when opened
if R <= 32 then
raise Exception.Create('unable to use default "mailto:" command.');
end;