Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a outlook new mail using php and html

I am creating a html page and I have a button in my html page. Once the button is clicked the outlook has to be opened with the "To" and the "Subject" information as shown in the figure.

enter image description here

Can any help me how to open the outlook with php.Thanks in advance.

like image 644
bharathi Avatar asked Dec 14 '11 11:12

bharathi


3 Answers

here the link to use:

<a href="mailto:[email protected]?subject=Feedback for webdevelopersnotes.com&body=The Tips and Tricks section is great">Send me an email</a>

Source is here.

like image 80
David Laberge Avatar answered Oct 06 '22 01:10

David Laberge


Use mailto hyperlink to open mail application on client machine

<a href="mailto:[email protected]?Subject=subject here&Body=bodytext">
    Link display text
</a>

You can also add cc and bcc using querystring paramters as we have done for body.

This will open default mail application configured on client machine; It may open different application accordingly.

like image 45
Maheep Avatar answered Oct 05 '22 23:10

Maheep


I think you should use a tag like following

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

But open Outlook, Thunderbird or other client is user's default setting.

like image 32
hungneox Avatar answered Oct 06 '22 01:10

hungneox