diff --git a/tailbone/views/email.py b/tailbone/views/email.py index ab667ec0..a028f316 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -226,9 +226,10 @@ class EmailPreview(View): del msg['Bcc'] msg['To'] = recipient - mail.deliver_message(self.rattail_config, msg) + sent = mail.deliver_message(self.rattail_config, key, msg) - self.request.session.flash("Preview for '{0}' was emailed to {1}".format(key, recipient)) + self.request.session.flash("Preview for '{}' was {}emailed to {}".format( + key, '' if sent else '(NOT) ', recipient)) def preview_template(self, key, type_): email = mail.get_email(self.rattail_config, key)