MAILTO Link in email to start a new email

27,111

Solution 1

Monday morning mistake on a Friday.

<a href="mailto:[email protected]?subject=Information
Requested&body=Here's more information. 
http://www.website.com/info/info.pdf">Send More Info</a>

Note the change of the question mark before the subject instead of an ampersand.

Solution 2

Yes, it's the ampersand. This works when using desktop email but when you switch to a mobile device it just causes it to be dumped into the "to:" line. Changing the ampersand to a question mark will make it work in both desktop and mobile environments.

Share:
27,111

Related videos on Youtube

Jeff
Author by

Jeff

I like stuff.

Updated on September 19, 2020

Comments

  • Jeff
    Jeff over 3 years

    I have a contact form on a website for customers to contact my company. Upon completing this form a correspondence is sent to the appropriate sales associate for that region. In this email it captures the information provided in the contact form the customer provided. More often than not the customer is requesting more information than what is available on our website.

    I would like to include a MAILTO link in the email sent to the sales associate that would allow them a one click option to send additional documents/information/webpages not open to public traffic to customers requesting the information. Something along the lines of:

    <a href="mailto:[email protected]&subject=Information
    Requested&body=Here's more information. 
    http://www.website.com/info/info.pdf">Send More Info</a>
    

    I've tested this link and found it works perfectly in Outlook, Thunderbird and even GMail. But on mobile devices such as Android, iPhone or iPad the entire portion of the MAILTO string is put in the recipient line. I've tried URL encoding the link to something like:

    <a href="mailto:[email protected]&amp;subject=Information
    Requested&amp;body=Here's more information.%0A%0A 
    http:%3A%2F%2Fwww.website.com%2Finfo%2Finfo.pdf">Send More Info</a>
    

    But this doesn't seem to change anything at all as the desired result is still not achieved. The second link still works properly in other email client just not mobile devices. My searching has led me to only find articles about creating the MAILTO link in code specific for Android or iOS devices.

    Any way to make this solution work in a normal email or webpage? Thanks!

  • Reyraa
    Reyraa over 9 years
    didn't worked for me even for : <a href="mailto:[email protected]">Send More Info</a>

Related