Is it possible to modify "from" field in mailto link?

19,914

No. Certainly not in most of the popular mail clients.

I assume you are wanting to do this just to save time in your own mail client. I would certainly be annoyed with a website that tried to change my from or reply-to address, so I'd expect my mail client to ignore it.

MAILTO is designed to facilitate a sender contacting an address that has been listed on a website. So there are very few things that the sender would expect to have dictated by the website. Even the standard options can be pretty annoying if handled badly by the website owner.

Your options are pretty much limited to

  • subject
  • body
  • cc
  • bcc

Even if a client were to support From (and I am not aware of any that do), there is no obvious way for them to handle edge-case scenarios such as a from address that has not been configured in the mail client.

What do you need this for? Perhaps you can use a script to send mails and dynamically set the From header. For example, PHP has a mail() function which would allow you to set a custom From address (and modify other headers).

Share:
19,914

Related videos on Youtube

Ilia Draznin
Author by

Ilia Draznin

Web developer and designer from Toronto.

Updated on June 04, 2022

Comments

  • Ilia Draznin
    Ilia Draznin over 1 year

    I'm trying to get a mailto link that would open a new outlook email window with a modified from field (i.e. to use a secondary account as it were). Is that possible?

  • Ilia Draznin
    Ilia Draznin almost 12 years
    It's for an internal web app. We need folks to be able to send from the same from address (with just a link). They already have it setup and can do it manually, we were just hoping to remove yet another click from the process as it were. I didn't really expect this to be supported but figured I'll give it a try. We use ASP backend and this is just a simple mailto link, not a complex form. I guess we could make a custom call on click and send it through backend with all of that setup but again, I was hoping for a quick and straightforward solution. In any case, thanks for the reply.
  • zmippie
    zmippie about 3 years
    What do you need this for? Well, I have 12 e-mailaccounts configured in my mail client, and I'm using a back-office system to quickly send an email. But my mail client cannot know from which account I want to send it. So it would be very handy to be able to supply the "From"-address to let your mail client know which account to choose. Obviously it wouldn't do anything when it's not an address that matches an account (good luck trying to email something with a spoofed "From" in these days of SPF, DKIM, DMARC, etc.)