Files
postgres-web/pgweb/mailqueue/models.py
Magnus Hagander bfa9b2a105 Track which emails are "user generated" for different antispam treatment
Basically, user generated email (bug report form) will be sent to the mail
frontends for antispam. Any errors generated there will be ignored and
the mails "dropped on the floor". Other emails keep entering the system
through localhost and delivered there.
2014-01-11 20:46:48 +01:00

15 lines
660 B
Python

from django.db import models
class QueuedMail(models.Model):
sender = models.EmailField(max_length=100, null=False, blank=False)
receiver = models.EmailField(max_length=100, null=False, blank=False)
# We store the raw MIME message, so if there are any attachments or
# anything, we just push them right in there!
fullmsg = models.TextField(null=False, blank=False)
# Flag if the message is "user generated", so we can treat those
# separately from an antispam and delivery perspective.
usergenerated = models.BooleanField(null=False, blank=False, default=False)
def __unicode__(self):
return "%s: %s -> %s" % (self.pk, self.sender, self.receiver)