Finding out the default mail client installed on your system and invoking that to send mail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajesh_Mohapatra
Posted On:   Wednesday, October 16, 2002 08:09 AM

Hi,

I need to write a program which will find out the default mail client installed on the system and invoke that.

Also I want to populate the fields to, subject etc. with the data programmatically.

How do I proceed about this?

Any suggesion is deeply appreciated.

thanx

regards
Rajesh

Re: Finding out the default mail client installed on your system and invoking that to send mail

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, October 16, 2002 10:16 AM

"the default mail client" means several different things, to different browser clients (may be several different "default mail clients" for different browsers), on different OS's, especially whether they're Microsoft Windows or not...




You can just produce an HTML page with a "mailto:address@host" URL on it, and if the user clicks on it, the default mail handler application for that browser should be invoked, IF there is one configured for the browser, and if it is set up correctly.



You can provide the "Subject" header content with a parameter to the mailto URL. But the set of return addresses, e.g. the "From:" header, "Reply-To:" header, and return path (SMTP envelope MAIL FROM sender field), all depend on the settings in the client mail application though, and are not settable from the mailto URL.



IF you want to get into the old Microsoft proprietary "simple MAPI provider" crapi (check MSDN, though I think even Microsoft is trying to phase this out now?), with some kind of COM bridge technology (various FAQ's on jguru), and IF the client host is Windows and has a default Simple MAPI provider client installed and registered and configured correctly(again look at MSDN) like Outlook, Outlook Express, or Netscape, I guess (good luck) you can control more parameters that way.

About | Sitemap | Contact