Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open outlook on click of email hyperlink

Tags:

asp.net-mvc

I have a table in which one column is an email address. I need to add a hyperlink to this email address, so that clicking it opens outlook with the email address in TO: field.

Can anyone help?

like image 313
veena Avatar asked Jul 11 '13 04:07

veena


People also ask

Why won't links open when I click on them in Outlook?

The main reason of hyperlinks not working in Outlook is the default Internet browser not registered (properly) in your operating system. Typically, this issue comes up after uninstalling Google Chrome or changing the default browser from Internet Explorer to either Chrome or Firefox.


2 Answers

Try this

 <a href="mailto:[email protected]?Subject=ABC&Body=Body" title="title" >Email</a>

Here ABC is Subject and email content is body.

like image 67
Amit Avatar answered Sep 28 '22 00:09

Amit


You can just use an href similar to the following (example [email protected] email address used):

<a href="mailto:[email protected]">[email protected]</a>

When the user clicks the link, their default email client will be opened.

For more advanced options such as subject lines, cc, bcc, etc, see these links: link 1 link 2 link 3. Normally mailto is a bit of a red flag for spammers, so if this is a public website then consider a link to a form with a capcha instead.

EDIT:

Try clicking Send Mail at this link and let us know what happens. This will indicate if the problem is with the markup or the system.

You might also want to make sure that there is a default mail program assigned for that computer. You didn't indicate OS, but if you are using Windows 8 then follow this link and set Outlook as the default. Otherwise, do the equivalent for your OS.

If all else fails try re-installing Outlook.

like image 40
acarlon Avatar answered Sep 28 '22 02:09

acarlon