Title: How to call the default email program to send an email
uses
ShellApi;
procedure TForm1.Button1Click(Sender: TObject);
var
strEmail, strSubject, strBody, Param: string;
begin
strEmail := 'user@host.com';
strSubject := 'Your Subject';
strBody := 'Your Message Text';
Param := 'mailto:' + strEmail + '?subject=' + strSubject +
'&Body=' + strBody;
ShellExecute(Form1.Handle, 'open', PChar(Param), nil, nil, SW_SHOWNORMAL);
end;
Note: Shellexecute doesn??t accept Attachments.
Use MAPI to send Attachments.
Use %0D%0A for a line break