- state = self.get_state()()
- recipient = state.get_example_recipient(email)
- self.send(recipient, test=True)
-
-
-class EmailSent(models.Model):
- template = models.ForeignKey(EmailTemplate, models.CASCADE)
- hash_value = models.CharField(max_length=1024)
- timestamp = models.DateTimeField(auto_now_add=True)
- email = models.CharField(_('e-mail'), max_length=1024)
- subject = models.CharField(_('subject'), max_length=1024)
- body = models.TextField(_('body'))
-
- class Meta:
- verbose_name = _('email sent')
- verbose_name_plural = _('emails sent')
- ordering = ('-timestamp',)
-
- def __str__(self):
- return '%s %s' % (self.email, self.timestamp)