tags:

views:

64

answers:

5

Can we specify to use a particular email client while using

<a href="mailto...

In my system it opens Microsoft Outlook. But what if someone does not have Outlook on his system? On such systems clicking the mailto link does nothing.

+1  A: 

It will open in the system's default email client. If the user does not have one selected, there's nothing you can do about it.

idrumgood
+3  A: 

No you can't. You can specify the email address, subject and some other parameters for the mail client. But which mail client is started is something the browser decides. It would be quite a security risk if you could decide that as a web developer.

WoLpH
A: 

You, as the site author, have no say. A mailto: link is supposed to launch the user's default mail program. Some users don't have a mail program though (think webmail users.)

The solution is to not use mailto: links but instead create a server-side form on your site, that does the actual mail sending.

Joe
That is not "the solution". The user asked if there was a way to control what program opened. Without knowing anything about his actual project, there is no way to know that server side mail handling is the solution.
idrumgood
Using mailto is a bad implementation. Any belief that it provides any kind of useful user experience (especially in light of today's rich email experiences within the browser) is misguided. Mailto is an anachronism of the early web. Don't use it. http://www.isolani.co.uk/articles/mailto.html
Joe
@Joe: mailto does have it's merit. I personally prefer my own email client over every single contact form I've seen so far. So personally I think one should provide both.
WoLpH
+2  A: 

There is much more you can use, but each system will act differently, for example in mine, I set up that all mailto links would open GMail.

mailto is a call to open the default mail browser, like using a link in a windows application will open the default browser and not a special browser if you have more installed.

The best way is always to create a form and send it by, either using the web server internal SMTP or using one of so many free scripts out there that sends everything in the form to a specify email.

and by the way, you can compose more than just the email address

<a href="mailto:[email protected]?subject=Call me&body=Call me to this number:">
      call me</a>
balexandre
A: 

On a Windows machine the [HKEY_CLASSES_ROOT\mailto\shell\open\command] contains the path to what program will open mailTo links. As such, it's not always the default mail program. I agree with Balexandre's idea that a web form gives you the most control though.

Derp Developer