def try_and_send_mail(self): from solonotebooks.cotizador.utils import send_email try: t = get_template('mails/change_product_price.html') if not settings.DEBUG: send_email(self.subscription.user, 'Cambio de precio de ' + str(self.subscription.product), t, {'product': self.subscription.product }) self.success = True except Exception, e: self.success = False
def try_and_send_mail(self): from solonotebooks.cotizador.utils import send_email try: t = get_template('mails/revive_product.html') if not settings.DEBUG: send_email(self.subscription.user, str(self.subscription.product) + ' volvió a estar disponible', t, {'product': self.subscription.product }) self.success = True except: self.success = False self.save()
def try_and_send_mail(self): from solonotebooks.cotizador.utils import send_email try: t = get_template('mails/change_product_price.html') if not settings.DEBUG: send_email( self.subscription.user, 'Cambio de precio de ' + str(self.subscription.product), t, {'product': self.subscription.product}) self.success = True except Exception, e: self.success = False
def try_and_send_mail(self): from solonotebooks.cotizador.utils import send_email try: t = get_template('mails/lost_product.html') if not settings.DEBUG: send_email( self.subscription.user, str(self.subscription.product) + ' ya no está disponible', t, {'product': self.subscription.product}) self.success = True except Exception, e: self.success = False