Board index » delphi » starting default email client from within an app

starting default email client from within an app

hello,

I am writing an app that must have the possibility to start the default
email client and prepare to reply on a message

I have this code to do it:

var
answerto : string;
mail, subject : string;
begin

mail := '...@fantastica.com'; // or the address to mail to
subject := 'a subject'; // some sub

answerto := 'mailto:' + mail + '?' + subject;

ShellExecute(Application.Handle,'open', PChar(answerto), nil,
nil,SW_NORMAL);

This code works fine, it open my default email client and starts the
mail, fills in the address and the subject.

but:

It first starts netscape and then gives the mailto as URL and then it
starts 2 reply messages.

Is this because netscape is my default mailclient and in the netscape
preferences i stated that the navigator must open when started? or is
there a way to prevent from 2 reply messages being started. It looks so
messy.

thanks

Jan

 

Re:starting default email client from within an app


Quote
jan adriaenssens wrote:
> It first starts netscape and then gives the mailto as URL and then it
> starts 2 reply messages.

> Is this because netscape is my default mailclient and in the netscape
> preferences i stated that the navigator must open when started? or is
> there a way to prevent from 2 reply messages being started. It looks so
> messy.

AFAIK is this a Netscape problem. Wait for Mozilla ;)
[as always: correct me if I'm wrong]
Regards,
Udo
--
Please reply only to the newsgroup. Do not send any unrequested mails.

Other Threads