I want to create a share by email button for posts in my website.
I have tried bellow code but its not working for me:
$email = '<a href="mailto:?subject='.$array['title'].'&body=Check out this site I came across '.$array['url'].'"><img src="'.get_template_directory_uri().'/images/social-email.png" /></a>';
Please help me in this.
Thank You in advance
Correct syntax is,
You didn’t put the email address in the mailto:
There’s no such thing as share-link-popup HTML code. If you want to show a popup you’ll have to add it yourself with another technique.
You’ll need some javascript to create the popup and some server side handling to actually send the email.