Exemple #1
0
    def send(self, *args, **kwargs):
        """Sends the email message."""
        self.prep_message_for_sending()
        save_email_message(sender=self, message=self, response=None, extra_data=None)
        response = super(SendGridEmailMultiAlternatives, self).send(*args, **kwargs)
        s = "Tried to send a multialternatives email with SendGrid and got response {r}"
        logger.debug(s.format(r=response))
        sendgrid_email_sent.send(sender=self, message=self, response=response)

        return response
Exemple #2
0
    def send(self, *args, **kwargs):
        """Sends the email message."""
        self.prep_message_for_sending()

        save_email_message(sender=self, message=self, response=None)
        response = super(SendGridEmailMessage, self).send(*args, **kwargs)
        logger.debug("Tried to send an email with SendGrid and got response {r}".format(r=response))
        sendgrid_email_sent.send(sender=self, message=self, response=response)

        return response
Exemple #3
0
 def save(self, extra_data, *args, **kwargs):
     """Saves the email message."""
     self.prep_message_for_sending()
     save_email_message(sender=self, message=self, response=None, extra_data=extra_data)