Re: Sending email from a Delphi application



John wrote:
Try this:

var
S: array [0..255] of char;
Mail: String;
begin
Mail := 'mailto:e.brown@xxxxxxxxxxx' + '?subject=test';
StrPCopy(S, Mail);
ShellExecute(handle,'Open', S, nil, nil, SW_SHOW);

Or far more tidy, with no 255 character restriction:

ShellExecute(handle,'Open', PChar('mailto:e.brown@xxxxxxxxxxx' + '?subject=test'), nil, nil, SW_SHOW);

Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org
.


Quantcast