Skip to content

Commit

Permalink
using reply-to header instead of sender to avoid rejected sender em…
Browse files Browse the repository at this point in the history
…ails.
  • Loading branch information
ikudriavtsev committed Jan 21, 2014
1 parent ff8c7b2 commit 629d1f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion personal.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def message():
if not form.validate():
return render_template('short_message_form.html', form=form)
# send an email if the form is valid
msg = Message("I've just sent you a message from your personal site", sender=form.email.data, recipients=[app.config['EMAIL']])
msg = Message("I've just sent you a message from your personal site",
recipients=[app.config['EMAIL']],
reply_to=form.email.data)
msg.body = form.message.data
mail.send(msg)
return HTMLString("<div class='alert alert-success'>Thank you for the feedback. I will try to reply as soon as possible.</div>")
Expand Down

0 comments on commit 629d1f9

Please sign in to comment.