Have Mail Change the Sender's Email Address if the to Address Is to Earthlink

Earthlink is blocking emails to my brother who has a peoplepc.com address. I don't want to change my primary from address but would like to enforce it on emails to my brother. I looked at Mail rules and nothing jumped out. Any way for KM to help?

I don’t think there are any apps that can do this, and certainly not Keyboard Maestro. You’d need something that could intervene between Mail.app and your mail server, and re-write the contents of the message. Anything that could do that would be a pretty big security risk, I’d think.

Hey @KBM,

You're using Apple Mail?

On what version of macOS?

Mail Act-On has outgoing rules that could probably do what you need, but SmallCubed Software's mail suite is expensive.

On the other hand it would be fairly easy to use a keyboard shortcut to intercept SEND in Mail and make sure the sender address for an outgoing email matches up with the target address.

This would require a bit of AppleScript UI-Scripting.


Yes Apple Mail on Big Sur and Catalina.

If I could remember to use a shortcut, I could remember to change the from address. I guess I wasn't thinking clearly, KM doesn't sit in the background and wait for things.

But thanks for asking. I remember Act-On from years ago I think when it was free, but I never had a real need or maybe I just couldn't manage my mail well enough to use it even when it was free.

Thanks for responding.


But you probably have things you always do, like open Mail, create a new message, and type your brother's name (or address) in the To field. So...

First, if you go to System Preferences > Keyboard > Shortcuts > App Shortcuts, you can make a keyboard shortcut for switching the From address to one that's not Earthlink. The format must be exactly like this:

FirstName LastName – Name@NotEarthLink.com

All of that information should match what you have in Mail > Preferences > Accounts for the desired account. And between the name and the address that's a Space, an En Dash, and another Space.

And give that a keyboard shortcut while you're in System Preferences. In the example below, the shortcut is Shift-Command-Control-Option-2.

With that set up, you could make a Mail-only Keyboard Maestro macro that looked something like this:


Two notes: I needed the pauses to ensure everything worked on my older Mac and OS X. You may not. This macro will only help with the issue when creating a new message, not when you're replying to one (if that's also an issue).

@NaOH Genius. Helps to have knowledgeable people around. I tend to avoid macOS system shortcuts because I forget that I've set them and they come back to bite me. But this will work fine. I don't use too many 5 character shortcuts (maybe none).

Works as advertised. I'd like to use ss as the shortcut because that's what I normally use for him. And it seems to work with the following a word break option (I thought at first it didn't, but seems to work now).

But bbb can be made to work since he's my baby brother in Bend, although that's not how I normally think of him.

Thanks again. Now to set the system shortcut on my other computer (done) and remember to be careful if I use iOS which I rarely do.

Edit. Although my brother is on Windows and not in any way a geek, he was able to change his address book to use my icloud.com address, so all is good. And thanks to everyone else who offered suggestions.

It can be anything—bbb if you'd like, since that's not going to be in anyone's name and the b is indicative of brother—just keep in mind that whatever you're most apt to remember would be best.

If you're a Dock or Spotlight user, you could make a macro using this Keyboard Maestro Action


then use File > Export As Trigger File to launch from the Dock or with Spotlight. As you noted earlier, KM won't watch for you to email your brother, so it's just a matter of picking the method that's most likely to be used.

Hey Greg,

If you make it a habit to always send your email with a keyboard shortcut, you can do it with Keyboard Maestro.

But outside of Mail Act-On I don't know of any way to make it happen automagically.