Changeset - c818c4cfb9ad
[Not reviewed]
default
0 1 0
Dennis Fink - 11 years ago 2014-07-15 19:37:16
dennis.fink@c3l.lu
Set sender in sendmail
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
ennstatus/status/functions.py
Show inline comments
 
@@ -13,13 +13,14 @@ mail = Mail()
 

	
 

	
 
def _send_mail(server_name, status, last_updated):
 

	
 
    current_app.logger.debug('Try sending mail')
 
    try:
 
        msg = Message('[Ennstatus] %s went %s' % (server_name, status))
 
        msg = Message('[Ennstatus] %s went %s' % (server_name, status),
 
                      sender='ennstatus@enn.lu')
 
        msg.add_recipient(current_app.config['SERVER_ADMINS'][server_name])
 
        msg.body = ('%s went to %s. I received the last update at %s'
 
                    % (server_name, status, last_updated))
 
        mail.send(msg)
 
    except KeyError:
 
        current_app.logger.error('Admin for %s not found!' % server_name)
0 comments (0 inline, 0 general)