Automaticlly Select From Address Depending on To Address

Hi,
I'm looking for some kind of email client solution that can do the following...

I manage several email addresses and sometimes I forget to change the send from when sending to different people. Is there some kind of plugin or software that can automatically detect who I am emailing then change my from address?

I have access to Thunderbird, Gmail and Outlook.

Thanks!!!
really24Asked:
Who is Participating?
 
David LeeConnect With a Mentor Commented:
Ok, try this.  Follow these instructions to add the code to Outlook.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools > Trust Center
9.  Click Macro Security
10. Set Macro Security to "Warnings for all macros"
11. Click OK
12. Close Outlook
13. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

You'll need to know the index number of each account.  The index number if the account's position in the list of accounts you seen when you create a new message and click the Account pulldown.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olkRcp As Outlook.Recipient, _
        intIndex As Integer, _
        olkSendThroughBtn As Object, _
        olkSendAccount As Object
    If Item.Class = olMail Then
        intIndex = 1
        For Each olkRcp In Item.Recipients
            Select Case LCase(olkRcp.Address
                'On the next line change the email address'
                Case "john.doe@company.com"
                    'On the next line change the index number'
                    intIndex = 2
                Case "jane.doe@hotmail.com"
                    intIndex = 4
            End Select
            If intIndex > 1 Then
                Exit For
            End If
        Next
        If intIndex <= Session.Accounts.count Then
            Set olkSendThroughBtn = Application.ActiveInspector.CommandBars("Standard").Controls(3)
            Set olkSendAccount = olkSendThroughBtn.Controls(intIndex)
            olkSendAccount.Execute
            Item.Save
        End If
    End If
    Set olkRcp = Nothing
    Set olkSendThroughBtn = Nothing
    Set olkSendAccount = Nothing
End Sub

Open in new window

0
 
David LeeCommented:
Hi, really24.

What version of Outlook?
0
 
really24Author Commented:
Hi BlueDevilFan,
I have Outlook 2007.

Do you know if it would be possible with Gmail's web interface?
Thanks!
0
 
David LeeCommented:
Sorry, I don't use Gmail so I don't know if it's possible there.  It's is possible with Outlook through the use of scripting.  If you want to pursue that solution, then I can help.  I can provide the code and instructions for using it.
0
 
really24Author Commented:
Hi BlueDevilFan,
Sure, I'll try using Outlook from now on and see how it goes.

Thanks!
0
All Courses

From novice to tech pro — start learning today.