Open a outlook new mail using php and html

2019-03-29 19:26发布

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.

3条回答
来,给爷笑一个
2楼-- · 2019-03-29 20:01

I think you should use a tag like following

<a href="mailto:your_mail@example.com">your_email</a> 

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

查看更多
Viruses.
3楼-- · 2019-03-29 20:14

Use mailto hyperlink to open mail application on client machine

<a href="mailto:toid@example.com?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.

查看更多
Emotional °昔
4楼-- · 2019-03-29 20:23

here the link to use:

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

Source is here.

查看更多
登录 后发表回答