- self.emailsent_set.create(
- hash_value=recipient.hash_value,
- email=recipient.email,
- subject=subject,
- body=body,
- )
-
-
-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',)