Distributes the contacts you receive sequentially to emails in a list.
When you have a sales team and would like the contacts received on a form to be equally distributed between them.
- Create an email account that will receive the contacts
Ex: [email protected]
- Create the email accounts where the contacts will be distributed.
- Upload the script to the server. (note: DO NOT use a public folder)
- Change script privileges
$chmod 744 contact-distribution.py
- Change the list of sellers (the same as you created in step 2)
# list with sellers or emails for distribution
sellers = [('Seller 01', '[email protected]'),
('Seller 02', '[email protected]'),
('Seller 03', '[email protected]')]
- Change the primary receiving email. (the same one you created in step 1)
s.sendmail("[email protected]", sellers[nextSeller][1],
msg.as_string())
- Add a new forwarding to the mail distribution.
- Forward it to the script.
Done.