#NEWLINE# def notify_role( role , subject , html ) : #NEWLINE# #INDENT# if ( role . email is None ) : #NEWLINE# #INDENT# log . error ( 'Role does not have E-Mail: %r' , role ) #NEWLINE# return #NEWLINE# #UNINDENT# sender = ( '%s <%s>' % ( get_config ( 'APP_TITLE' ) , get_config ( 'MAIL_FROM' ) ) ) #NEWLINE# subject = ( '[%s] %s' % ( get_config ( 'APP_TITLE' ) , subject ) ) #NEWLINE# msg = Message ( subject = html , sender = sender , recipients = [ role . email ] ) #NEWLINE# msg . html = html #NEWLINE# mail . send ( msg )