Question

On some websites when I click the contact email link, I get either a list or some icons for common email programs like gmail, yahoo, hotmail, etc., and I can pick which email program I want to open, then the email program opens and fills in the To: and Subject: fields. I can't find any web pages to show as an example, but I have seen it sometimes with Craigslist. Does anybody know how to code for this?

Was it helpful?

Solution 2

viewing source on craigslist you can see the urls; this is gmails:

https://mail.google.com/mail/?view=cm&fs=1&to=TOADDRESS&su=SUBJECT&body=BODY&tf=1&shva=1

you want to check each sites documentation for the particulars

OTHER TIPS

You can populate subject and body - in most e-mail clients - like this:

<a href="mailto:example@example.com?subject=Subject+line&body=Body+goes+here.">E-mail</a>

This is usually a far better solution than making the user pick their provider and relying on an undocumented and subject-to-change URL format of some sort, not to mention it works with desktop clients like Outlook.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top