<s> from django . conf import settings <EOL> from django . core . mail import EmailMultiAlternatives <EOL> def send_mail ( email_from , email_to , subject , text_content , html_content ) : <EOL> mail = EmailMultiAlternatives ( <EOL> subject = subject , <EOL> body = text_content , <EOL> from_email = email_from , <EOL> to = [ email_to ] <EOL> ) <EOL> mail . attach_alternative ( html_content , "<STR_LIT>" ) <EOL> mail . send ( ) <EOL> def send_activation_email ( email , host , activation_key ) : <EOL> email_from = '<STR_LIT>' % settings . EMAIL_SENDER <EOL> email_to = email <EOL> subject = '<STR_LIT>' <EOL> activation_url = '<STR_LIT>' + host + '<STR_LIT>' + activation_key <EOL> text_content = '<STR_LIT>' '<STR_LIT>' + activation_url + '<STR_LIT>' <EOL> html_content = '<STR_LIT>' '<STR_LIT>' '<STR_LIT>' + activation_url + '<STR_LIT>' + activation_url + '<STR_LIT>' + '<STR_LIT>' <EOL> send_mail ( email_from , email_to , subject , text_content , html_content ) <EOL> def send_password_reset_email ( email , host , reset_key ) : <EOL> """<STR_LIT>""" <EOL> email_from = '<STR_LIT>' % settings . EMAIL_SENDER <EOL> email_to = email <EOL> subject = '<STR_LIT>' <EOL> reset_url = '<STR_LIT>' + host + '<STR_LIT>' + reset_key <EOL> text_content = '<STR_LIT>' '<STR_LIT>' + reset_url + '<STR_LIT>' '<STR_LIT>' '<STR_LIT>' + reset_url + '<STR_LIT>' '<STR_LIT>' '<STR_LIT>' <EOL> html_content = '<STR_LIT>' '<STR_LIT>' '<STR_LIT>' + reset_url + '<STR_LIT>' + '<STR_LIT>' + reset_url + '<STR_LIT>' + '<STR_LIT>' "<STR_LIT>" "<STR_LIT>" + '<STR_LIT>' + reset_url + '<STR_LIT>' + '<STR_LIT>' + reset_url + '<STR_LIT>' + '<STR_LIT>' <EOL> send_mail ( email_from , email_to , subject , text_content , html_content ) </s>
