[rfc] add pre-render and pre-send signals for email

Issue #1088 resolved
Tay Ray Chuan
created an issue

[[http://github.com/rctay/satchmo/compare/tip...rc/email-signals | Check out the diff stat here]].

Useful for email customization.

An example:



from satchmo_store.shop.signals import order_notice_sender

def modify_subject(sender, send_mail_args={}, context={}, **kwargs): if not ('shop_name' in context and 'order' in context): return

send_mail_args['subject'] = '[%s] Woohoo! You got a new order! (ID: #%d)' % \ (context['shop_name'], context['order'].id)

sending_store_mail.connect(modify_subject, sender=order_notice_sender) }}}

Comments (3)

  1. Log in to comment