On Thu, May 21, 2015 at 10:06:28AM +0200, John Landmesser wrote:
> i want to send a mail on windows using shellexecute with german
> Umlauts ( ö,å,ü .. ) in the body of the mail.
>
> This Code doesn't work:
>
> var s: string;
>
> s := 'öööööö'
>
>
> shellexecute(Application.Mainform.handle, 'open',PChar('mailto:' +
> '[email protected]' + '?subject=' + 'ARJ-ChapterArchiv: ' +
> '&body=' + UTF8ToAnsi(s)),nil, nil, sw_normal);
>
> Good tipps are welcome!    I don't want to use Indy or synapse!

I use something like this:

if Win32MajorVersion < 5 then
        Ret := ShellExecute(0, 'open', PChar(UTF8ToSys(AProg)), nil, nil, 
SW_SHOWNORMAL)
else
        Ret := ShellExecuteW(0, 'open', PWideChar(UTF8Decode(AProg)), nil, nil, 
SW_SHOWNORMAL);

Result := Ret > 32;

Henry

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to