This script sends bulk emails in Outlook to a list of recipients. It connects to Outlook's SMTP server and uses standard TLS encryption to send messages.
In order for the script to run properly, there are a few prerequisites that must be upheld. The simplest solution is to configure a virtual environment with the following dependencies:
-
Python 3 or above
-
'xlrd' package
-
'cx_Freeze' package
In order to properly use the script, a few formatting requirements need to be followed.
-
A spreadsheet file named 'data.xlsx' should store recipient information.
-
The first column should have the names of recipients
-
The second column should have the email addresses of recipients
-
The script does not read the first row since it is typically column labels.
-
-
An HTML file named 'message.html' should store the content of the email.
-
The first line should have the subject of the email
-
The HTML section should have the body of the email
-
There is a placeholder for the recipients name. Any additional placeholders in the message should be amended in the Python script as well.
-
Note: If you change any of the naming conventions or formatting for these files, you should update the script to reflect them.
Before running the setup script, be sure that any file naming changes are reflected in the 'setup.py' file.
-
Change directory into the 'automail' folder.
-
In the terminal, run the following command:
$ python3 setup.py build
Note: You may need to replace 'python3' with 'python' depending on how Python was configured.
You should now see a folder called 'build' with another folder that stores the .exe file. You can move the folder anywhere, but do not change any of the folder's internal structure. However, you can still edit the spreadsheet and message files with updated content as long as their locations remain the same.