hi all, i wannna to ask how to send mail through default mail client installed in users computer? ie i put an email link in a dialog window and when user click it, it execute... like outlook express maybe ;)

thanks
Posted on 2002-10-07 03:37:52 by dion

hi all, i wannna to ask how to send mail through default mail client installed in users computer? ie i put an email link in a dialog window and when user click it, it execute... like outlook express maybe ;)

thanks


Hi!

Either ShellExecute a "mailto:" link or read out one of the following regkeys:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
HKEY_CLASSES_ROOT\mailto\shell\open\command

I'd choose the ShellExecute way because its the most savest :)
Posted on 2002-10-07 06:06:04 by bazik
hi bazik, unfortunately, i've trying the ShellExecute with "mailto:"... but it seems not working. actually i already come to this manner when trying ShellExecute with "open" + url, but for email it wont work...

could u tell me why is that happen?
Posted on 2002-10-07 21:13:55 by dion

hi bazik, unfortunately, i've trying the ShellExecute with "mailto:"... but it seems not working. actually i already come to this manner when trying ShellExecute with "open" + url, but for email it wont work...

could u tell me why is that happen?


If you use "open" as action (setting it to 0 does the same) and "mailto:blah@blah.net" as command it works.
If not, show us your code ;)
Posted on 2002-10-08 00:58:54 by bazik
hi bazik, i was realized that i'm making stupid mistake. i was changing the "open" to "mailto:", so the code wont work. now, as addition, i'm including subject too! ie for the string param i fill "mailto:"+myemail+"?subject=Blah-blah...". But then i was stuck again about how to include the mail body text :(

do u know how to do this, bazik?

thanks
regards
Posted on 2002-10-08 02:56:45 by dion

do u know how to do this, bazik?


Sure :)




mailto:test@test.net?cc=test2@test.net&bcc=test3@test.net&subject=my%20subject&body=cool%20a%20body
Posted on 2002-10-08 04:33:16 by bazik
thanks bazik, actually i've found it several minutes after posting prev thread. uh... how can i be a moron like this ;p
i'm a noob who dont RTFM... with M stands for MSDN Manual, with keyword "mailto protocol".

bye
Posted on 2002-10-08 21:09:36 by dion