def send_notification(device_name):
 current_time = datetime.now()
 sender = 'sender@domain.com'
 recipient = 'recipient@domain.com'
 subject = 'Device {0} was modified'.format(device_name)
 message = '\nThe running configuration of {0} was modified.  \n\nThis change was detected at: {1}\n\n'.format(device_name, current_time)
 if send_mail(recipient, subject, message, sender):
  print 'Email notification sent to {}'.format(recipient)
  return True

def send_notification ( device_name ) : current_time = datetime . now ( ) sender = 'sender@domain.com' recipient = 'recipient@domain.com' subject = 'Device {0} was modified' . format ( device_name ) message = '\nThe running configuration of {0} was modified.  \n\nThis change was detected at: {1}\n\n' . format ( device_name , current_time ) if send_mail ( recipient , subject , message , sender ) : print 'Email notification sent to {}' . format ( recipient ) return True
notify concerned persons about recurring document generation .