Check/Change Sending Account based on To: Address

I hoping to avoid the VBA backend of Outlook for this, but it may be necessary. The business I work for has multiple accounts for me to send mail from depending on which client I am sending to. Every now and then I screw up and send from the defaulted account, and catch hell. What I want is a Rule that would check if I'm sending to any addresses in the example.com domain, and send it via my SecondAccount. The Rules Wizard has a catch for "After I have sent", which would tell me that I screwed up, but my boss does a good job of that. My emaisl are sent ASAP--maybe I just turn that off and send every 5 minutes and use a rule--there's still a risk there, if I send it right before the 5-minutes are up--it would leave de facto ASAP.

Re: Check/Change Sending Account based on To: Address

I think there is a VBA way to hook into the Send button, but I can't recall ever doing it myself.

If it's really career threatening, you could make the outgoing server on your default account some bogus string, forcing you to choose a "send using" account for every message. I guess that would be a nightmare. But if you have no other workaround...

Re: Check/Change Sending Account based on To: Address

<img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15> In native outlook VBA, the Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Event will catch a message before it's "out the door", but the SenderEMailAddress Property and SenderName Property are read only. So you might be able to write code that stops them and sends them back to your drafts folder with a warning message. The Redemption library exposes more Outlook Properties, and may permit you to completely code the automation of Sender Account, but I don't have experience coding with Redemption.

Re: Check/Change Sending Account based on To: Addr

<hr>So you might be able to write code that stops them and sends them back to your drafts folder with a warning message. <hr>

That's perfect. I don't screw it up every time, so it's not like this would pop up and irritate me constantly. It's the few times I err that have the onus. I'll fiddle with this Event a little and see if I can get it to happen. I'll post updates with progress. <img src=/S/wink.gif border=0 alt=wink width=15 height=15> I knew I'd end up in Outlook's VBA Hell. <img src=/S/devil.gif border=0 alt=devil width=15 height=15>