Remove welcome email debugging
This commit is contained in:
parent
680039fa51
commit
665a2bddef
|
@ -346,7 +346,7 @@ def register_user(data, user):
|
||||||
if data['request_id']: utils_stats.set_progress(data['request_id'], 'Sending welcome email...')
|
if data['request_id']: utils_stats.set_progress(data['request_id'], 'Sending welcome email...')
|
||||||
try:
|
try:
|
||||||
utils_email.send_welcome_email(user.member)
|
utils_email.send_welcome_email(user.member)
|
||||||
except BaseException as e: # TODO: remove, just for testing
|
except BaseException as e:
|
||||||
msg = 'Problem sending welcome email: ' + str(e)
|
msg = 'Problem sending welcome email: ' + str(e)
|
||||||
logger.exception(msg)
|
logger.exception(msg)
|
||||||
alert_tanner(msg)
|
alert_tanner(msg)
|
||||||
|
|
|
@ -30,17 +30,12 @@ def send_welcome_email(member):
|
||||||
with open(EMAIL_DIR + 'welcome.html', 'r') as f:
|
with open(EMAIL_DIR + 'welcome.html', 'r') as f:
|
||||||
email_html = replace_fields(f.read())
|
email_html = replace_fields(f.read())
|
||||||
|
|
||||||
try:
|
|
||||||
send_mail(
|
send_mail(
|
||||||
subject='Welcome to Protospace!',
|
subject='Welcome to Protospace!',
|
||||||
message=email_text,
|
message=email_text,
|
||||||
from_email=None, # defaults to DEFAULT_FROM_EMAIL
|
from_email=None, # defaults to DEFAULT_FROM_EMAIL
|
||||||
recipient_list=[member.user.email, 'portal@tannercollin.com'],
|
recipient_list=[member.user.email],
|
||||||
html_message=email_html,
|
html_message=email_html,
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info('Sent welcome email:\n' + email_text)
|
logger.info('Sent welcome email:\n' + email_text)
|
||||||
except smtplib.SMTPException as e:
|
|
||||||
msg = 'Problem sending welcome email to ' + member.user.email + ': ' + str(e)
|
|
||||||
utils.alert_tanner(msg)
|
|
||||||
logger.exception(msg)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user