Search code examples
javascriptphphtmlmailto

Add predefined from email address on HTML mailto


Is there are any way to add predefined from email address on html mailto syntax. So Microsoft Outlook open with a redefined from email address. Any way to do it with php/javascript or anything else.


Solution

  • The references RFC is: https://www.rfc-editor.org/rfc/rfc6068

    You can't set the FROM value but you can do something like this:

    <a href="mailto:your@email.address?cc=jose@email.address&bcc=john@email.address&subject=Comments about the color blue&body=The following is everything I have to say about the color blue.">Contact Us</a>