Question : Easily change outgoing address.  Outlook 2010 (or 2007 or 2003)

We've got a client who sends mail from 50-75 different addresses (long story).  Replies get in using a proprietary system - they're not real accounts, but the replies do get to the user - think of it as a wildcard address if you will.

Anyway, we accomplished the sending ability using Outlook 2007 and Outlook 2010 by having a second account setup on the client machine using SMTP.  When he wants to send, he needs to go to the account settings and then change the email address.  It works, but it's a pain for him.

Now with Outlook 2010, there's also the checkbox that needs to be unchecked: "Test Account Settings by clicking the Next Button"   The account is setup with a bogus smtp server, since there's no mail checking.  We don't want to test.

At a minimum, I want to see if there's a way to permanently uncheck this test option in Outlook 2010.  

Optimally, I'd like to have some sort of VBA code that can be run to change the email address on an account.

Any insight would be appreciated.

Answer : Easily change outgoing address.  Outlook 2010 (or 2007 or 2003)

Assuming you have the redemption add-in how about:

testone is just that a test routine to demo it working
changeSender is the routine that actually changes the reply address whilst using the original sending account:

i.e. doris@doris is the sender email address but after the function it is received as:

Someone, ([email protected])

Chris
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Sub testone()
Dim mai As MailItem

    Set mai = Application.CreateItem(olMailItem)
    changeSender mai
    mai.To = "fred.fred.com"
    mai.Subject = "changesender test"
    mai.Send

End Sub

Sub changeSender(mai As MailItem)
Dim sItem As Redemption.SafeMailItem
Dim str As Variant
Dim tag As Long

    Set sItem = CreateObject("Redemption.SafeMailItem")
    sItem.item = mai
    tag = sItem.GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From")
    tag = tag Or &H1E     'the type is PT_STRING8
    sItem.Fields(tag) = "Someone <[email protected]>"
    sItem.Subject = sItem.Subject 'to trick Outlook into thinking that something has changed
    sItem.Save

End Sub
Random Solutions  
 
programming4us programming4us