HTML: send to friend link

I need to add the "Send to a friend" link to my site.

When a user clicks on it, their email software should open and the email should be filled out.

Subject: Site name Body: Link to the site, a brief description

perhaps? thank

+3
source share
6 answers
<a href="mailto:enteryour@addresshere.com?subject=Website Name&body=Link to website, short description">Send me an email</a>

This is one way.

+8
source

Using the mailto and GET protocol parameters is correct, but you should also use the urlencoded version for strings:

<a href="mailto:enteryour@addresshere.com?subject=Website+Name&body=Link+to+website%2C+short+description">Send me an email</a>

"+" "%20". PHP urlencode() , python 2.x urllib.urlencode() urllib, Perl uri_escape URI:: Escape package... ..

+2

<a href="mailto:myfriend@gmail.com?subject=Patrick's Website at patrickrules.com&body=<a href="http://www.patrickrules.com&quot; title="Link to Patrick Official Website">It's Patrick's Official Website!</a>">Send to a friend
+1
source
<a href="mailto:s123@example.com?subject=Feedback for 
webdevelopersnotes.com&body=Link to website, short description">Send to a friend</a>
0
source

Use <a href="mailto:..." />.

Link

0
source

I think that you will need a simple form that allows people to enter their friends email address there. php mail is possible (just in case people don’t have email).

0
source

Source: https://habr.com/ru/post/1756363/


All Articles