you can use Geert_Gruwez's or Epasquier's functions, but I guess it will fail on ShellExecute function, because of too much character and special characters.
As far as I know you've installed JCL -> you can use its JclMAPI unit like this:
uses
JclMAPI;
procedure TForm1.Button1Click(Sender
: TObject);
var
strEmail, strSubject: string;
s: string;
i: Integer;
begin
strEmail := '
[email protected]';
strSubject := 'Your Subject';
// use Geert_Gruwez's function or Epasquier's function to generate body
s := '';
for I := 0 to table.Fields.Count-1 do
s := s + Format('%20:20s', [table.Fields.Fields[I].Ca
ption]);
s := s + #13#10 + DupeString('-', 21*table.Fields.Count) + #13#10;
while not table.Eof do
begin
for I := 0 to table.Fields.Count-1 do
s := s + Format('%20:20s', [table.fields.Fields[I].As
String]);
s := s + #13#10;
table.Next;
end;
JclSimpleSendMail(strEmail
, '', strSubject, s );
end;