Tweak flash message when sending email preview, in case it's disabled
This commit is contained in:
parent
ed4c445fbe
commit
35d1c24bc7
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue