none
Handling multiple email addresses (from within a single account) RRS feed

  • Question

  • Hi,
    I'm using http://www.spamgourmet.com to help reduce the spam I get, by using alternate, site-specific addresses instead of my primary email address when I'm asked for an email address on a website.
    Any email sent to one of my xxx.yyy@spamgourmet.com addresses get seamlessly redirected to my primary email address, so when I get such an email Outlook displays it as:
     
     
    When I reply to such an email I don't want to reveal my primary email address to the person I'm replying to so I would like to automate two things:
     
    - change the "From" so it's xxx.yyy@spamgourmet.com, not my primary email address (that's configured in the Outlook email account -- that's a POP3 account FWIW)
    - change the "Reply-To" so it's xxx.yyy@spamgourmet.com, not my primary email address
    And on all replies I'd like to add a Bcc: (or Cc: if that's simpler) of whatever the "From" is (so that I get a copy sent to me; I'm using multiple computers and also webmail so just having Outlook keeping a copy in "Sent items" is not enough for me).
    I'm wondering what "technology" (or "technologies") I have to use to do this:
    - rules
    - VBA macros
    - Outlook add-in (I know C++, and am starting to learn C#) -- in this case what do I need in addition to Visual Studio (is Express enough? I could use VS11 Dev Preview as that's equivalent to an "Ultimate" SKU)?
    Any pointers to sample code that does similar things would be appreciated.
    TIA for your help
    Stéphane.
    Sunday, January 22, 2012 7:58 AM

Answers

  • When you type a custom sender address in Outlook, it updates PR_SENT_REPRESENTING_xyz properties on the outgoing message (look at a sent mesage with OutlookSpy - click IMessage).

    The problem is that Sender MIME header would still be your regular e-mail account address, you need to set both Sender and From MIME headers.

    See http://www.dimastr.com/redemption/faq.htm#14 for an example using Redemption. The example sets theFrom MIME header. Do the same for the Sender header.

    You should be able to do the same using MailItem.PropertyAccessor in Outlook 2007 or higher.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 24, 2012 9:10 PM

All replies

  • I think that rules and macros will be sufficient for tasks you described, no need to use heavy approach with add-in.
    Monday, January 23, 2012 12:22 PM
  • Can you please give me a few hints / clues on where to start from?

    Can I define rules that are triggered conditionally?

    How can I attach a macro so that its code is run e.g. on a reply action after the reply message has been created and its From/To/Bcc/Reply-To headers populated but before the message composer window is displayed?

     

     

    Monday, January 23, 2012 1:05 PM
  • Experiment with creation of rules, one of their options is to run rule when sending email, see if it ok for you to add CC field there.

    You can also run a macro when triggering a rule, there is something called 'run a script' rule action, where you can specify your previously created subroutine.

    Monday, January 23, 2012 2:38 PM
  • Well... rules run "after I send a message" cannot be triggered when "some text is found in headers", nor can they "run a script." This trigger and this action only are valid for rules run "when I receive a message"...

    So back to square one: how do I attach an action that will get run when I hit the "Reply" button (or "Reply to all" for that matter)?

     

    Monday, January 23, 2012 7:49 PM
  • You can try to reset the account to xxx.yyy@spamgourmet.com when you receive a new message addressed to xxx.yyy@spamgourmet.com. Thsi way when you reply, the account would be already correctly set. 
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Monday, January 23, 2012 9:06 PM
  • Did you see that the title of this thread mentions "from within a single account"?

    I don't have multiple accounts, nor do I want to create one for each and every one of my spamgourmet addresses!

     

    Tuesday, January 24, 2012 3:17 PM
  • You cannot do that if you do not have multiple accounts.

    And even if you could replace the Sender and from MIME headers on the outgoing e-mails (there are ways to do that), chances are your outgoing SMTP server will reject emails like that.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 24, 2012 3:33 PM
  • My SMTP server happens to accept that just fine (I did a manual test where I changed the From: and Reply-to: using Outlook's UI)

    And I don't understand why using a different account (with the same SMTP/POP3 credentials) would change anything to that...

    Can you please elaborate on the "... ways to do that" you're hinting at?

    If Outlook's UI can do it, then it should be doable in a programmatic fashion... IMVHO...

     

    Tuesday, January 24, 2012 6:20 PM
  • You can in the straight way delete or remove all unauthorized mails.

    Every incoming mail (by VBA and Rule) check of occurrence in the adressbook.

    Of course if you delete them, you'll be cloce for new contacts.

    Also possible to transfer these messages to another folder, or send to another account.


    Oskar Shon, Office System MVP

    Press if Helpful; Answer when a problem solved

    Tuesday, January 24, 2012 6:56 PM
  • It really seems I cannot make myself understood.

    I don't want to get rid of these emails. Thanks to SpamGourmet they are all legitimate emails to me but that are sent to an alternate address that allows me among other things to detect whether someone has "sold" my email address to someone else. So if have have supplied company X with address X.xxx@spamgourmet.com and I get an email from them I want to reply as X.xxx@spamgourmet.com and not as my normal address, and to ensure they do reply to X.xxx@spamgourmet.com as well.

    Of course I could use alternate Outlook accounts but I would need one for each of my SpamGourmet addresses and that's not practically feasible: I currently have 56 different addresses, and create a new one every time I register on a new website.

    Back to square one: I need to trigger code (VBA or C++ or C#) that executes when I hit "Reply" and from there detect what the original "To:" was, and modify the new (composed reply) email's "From" and "Reply-to" to the alternate email address, the same way I'm able to that manually using 1) the "From" button (combo) in the message composer window 2) the "Direct replies to" button on the message composer's "Options" tab.

     

     

    Tuesday, January 24, 2012 8:16 PM
  • When you type a custom sender address in Outlook, it updates PR_SENT_REPRESENTING_xyz properties on the outgoing message (look at a sent mesage with OutlookSpy - click IMessage).

    The problem is that Sender MIME header would still be your regular e-mail account address, you need to set both Sender and From MIME headers.

    See http://www.dimastr.com/redemption/faq.htm#14 for an example using Redemption. The example sets theFrom MIME header. Do the same for the Sender header.

    You should be able to do the same using MailItem.PropertyAccessor in Outlook 2007 or higher.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 24, 2012 9:10 PM