def sendEmail(httpOrigin, email, activationId, mailer):
'''
Create a message and send it from our email to
the passed in email. The message should contain
a link built with the activationId
'''
if activationId is None:
return
#Change the URL to the appropriate environment
host = getProperEnvironment(httpOrigin)
url = host + '/activation/{0}'.format(activationId)
message = render_template('registrationEmail.html', url=url)
#Build Message
msg = Message('Mentii: Thank You for Creating an Account!', recipients=[email],
extra_headers={'Content-Transfer-Encoding': 'quoted-printable'}, html=message)
#Send Email
mailer.send(msg)
评论列表
文章目录