문제

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?

도움이 되었습니까?

해결책 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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top