Commit 84f3ce9f authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

fix send_status call

parent 24e95345
......@@ -9,7 +9,7 @@ from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def send_status(subject, message, to_list, from_address,
def send_status(subject, message, to_list, from_address='no-reply@aer.com',
password=None, text_attachment=None, reply_to='no-reply@aer.com', smtp_server='smtp.aer.com',
**kwargs):
"""Send an email message to a given recipient list."""
......@@ -17,7 +17,8 @@ def send_status(subject, message, to_list, from_address,
mail['From'] = from_address
mail['Subject'] = subject
mail['To'] = ', '.join(to_list)
mail['Reply-To'] = reply_to
if reply_to != from_address:
mail['Reply-To'] = reply_to
for key, value in kwargs.iteritems():
mail[key] = value
......@@ -73,5 +74,5 @@ if __name__ == '__main__':
<P>Fin</P>
"""
default_addresses = ['acappallo@aer.com']
send_status('Non-pyProcess Email Module', default_addresses, msg)
default_addresses = ['tcappallo@veriskclimate.com']
send_status('Non-pyProcess Email Module', msg, default_addresses)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment