def sendClassRemovalEmail(dynamoDBInstance, mailer, jsonData):
'''
Create a message to send it from our email to
the passed in email. The message should notify the user they were removed from a class
'''
email = jsonData.get('email')
classCode = jsonData.get('classCode')
cl = getClassByCode(classCode, dynamoDBInstance)
classTitle = cl['title']
message = render_template('removedEmail.html', classTitle=classTitle)
#Build Message
msg = Message('You have been removed from a class', recipients=[email],
extra_headers={'Content-Transfer-Encoding': 'quoted-printable'}, html=message)
mailer.send(msg)
评论列表
文章目录