Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing mail from 1 box to 4 other boxes evenly. 5

Status
Not open for further replies.

rihtx

IS-IT--Management
Feb 6, 2007
12
US
Got a SBS2003 SVR with EX SVR 2003. We have a info@xxx.com which recieves a lot of messages. Currently a designated person is evenly distributing the messages in circular fashion to 4 sales people EVENLY i.e.:

Message 1 is foraded manually to mailbox a
Message 2 is foraded manually to mailbox b
Message 3 is foraded manually to mailbox c
Message 4 is foraded manually to mailbox d
Message 5 is foraded manually to mailbox aa
Message 6 is foraded manually to mailbox b
Message 7 is foraded manually to mailbox c
Etc.

I am looking for a solution which would automatically forward the next message to the next mailbox instead of doing this manually. I can not just grant access for all 4 sales people as they would abuse and fight over the messages in the info@xxx.com mailbox.

Thanks
 
I honestly do not think this is possible with in Exchange. There would have to be some very special scripting done to make something like that happen; somehow monitor the email box and then trigger off forwards in a round robin effect.

This would be interesting to solve or create, but not my expertise.

_______________________________________
Great knowledge can be obtained by mastering the Google algorithm.
 
Sorry to have to prove you guys wrong [blush] but this is actually really simple. Took me all of about ten minutes of research and just a few to write the script.

Disclaimer: this will use a client side Outlook rule and will only work if Outlook is open.

1. Create a text file in the root of the C drive. Call it MailRotation.txt. Edit the file and put the number 1 in it.

2. In Outlook, click Tools, Macro, Visual Basic Editor.

3. Double click "ThisOutlookSession"

4. Paste the following code into it.
Code:
Sub SalesForwardingRule(Item As Outlook.MailItem)
    Const ForReading = 1
    Const ForWriting = 2
    Dim objFSO
    Set objFSO = CreateObject("scripting.filesystemobject")
    Set oFile = objFSO.OpenTextFile("C:\MailRotation.txt", ForReading)
    LastSent = oFile.ReadLine
    If LastSent < 4 Then
        SendTo = LastSent + 1
    Else
        SendTo = 1
    End If
    oFile.Close
    Set oFile = objFSO.OpenTextFile("C:\MailRotation.txt", ForWriting)
    oFile.Write SendTo
    oFile.Close
    
    Select Case SendTo
        Case 1
            Address = "user1@company.com"
        Case 2
            Address = "user2@company.com"
        Case 3
            Address = "user3@company.com"
        Case 4
            Address = "user4@company.com"
    End Select
    
    Set myItem = Item.Forward
    myItem.Display
    myItem.Recipients.Add Address
    myItem.Send

End Sub

5. Click Save, then close the Visual Basic Editor

6. Edit the email addresses in the code to the addresses you want to rotate the forwards to.

7. Create a new Outlook rule, click Tools, Rules & Alerts, New Rule.

8. Select Check messages when they arrive under the Start From A Blank Rule heading.

9. Click Next

10. Check Through the specified account. Under step 2 click the underlined word and choose the account the emails are coming from.

11. Click Next

12. Check Run a script. Under step 2 click the underlined word and choose the SalesForwarding Rule. Click OK

13. Click Finish

All done. The forwards will happen behind the scenes and rotate between the users. The text file is used to keep track of which user last received a sales lead. If you check it, you will see the number will increment to 4 and then start back at 1.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Just re-read my comments above and I guess I was too excited over the script. Didn't actually intend to have such a condescending tone. This was a great question and was the first script I had written for an Outlook rule, so I was a little too full of myself. Apologies to any who may have been put off by my failed attempt at humor & bravado.

Mark
 
No harm, Mark. I maintain my answer is correct. It doesn't happen in Exchange. But your answer does provide a work around that should fulfill the OP's needs. A star for you.

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
And I maintain that a very special script could probably do it...:)

Star to ya

_______________________________________
Great knowledge can be obtained by mastering the Google algorithm.
 
Markdmac, i never thanked you for yout great assistance. Hereby: THANK YOU!
 
Happy to assist. It was a fun script to write.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
And a star for me for thinking outside the box. The OP wanted Exchange to do it. You achieved it for the OP in a really simple and clear manner.

I didn't feel you were condescending, I saw the excitement and thought "wow, that's simple and clever". Hence the star.

That's why OP and TipMasters come together here.
 
Thanks Zelandakh, those that know me know my passion for scripting and know I sometime get a little carried away in excitement. I appreciate that you saw it for what it was.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top