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

1

20

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?

Halftimbered answered 21/2, 2012 at 16:11 Comment(0)
S
23

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).

Sharkey answered 21/2, 2012 at 19:21 Comment(3)
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.Halftimbered
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.)Sanctify
@IliaDraznin, You need a better mail client?Pirri

© 2022 - 2024 — McMap. All rights reserved.