1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

changes main directory to mailbox2

This commit is contained in:
Joe 2021-02-07 22:54:52 -05:00
parent 010611dc55
commit 5177ea5c65
83 changed files with 4 additions and 53025 deletions

View file

@ -0,0 +1,165 @@
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.CreateModel(
name="Mailbox",
fields=[
(
"id",
models.AutoField(
verbose_name="ID",
serialize=False,
auto_created=True,
primary_key=True,
),
),
("name", models.CharField(max_length=255, verbose_name="Name")),
(
"uri",
models.CharField(
default=None,
max_length=255,
blank=True,
help_text="Example: imap+ssl://myusername:mypassword@someserver <br /><br />Internet transports include 'imap' and 'pop3'; common local file transports include 'maildir', 'mbox', and less commonly 'babyl', 'mh', and 'mmdf'. <br /><br />Be sure to urlencode your username and password should they contain illegal characters (like @, :, etc).",
null=True,
verbose_name="URI",
),
),
(
"from_email",
models.CharField(
default=None,
max_length=255,
blank=True,
help_text="Example: MailBot &lt;mailbot@yourdomain.com&gt;<br />'From' header to set for outgoing email.<br /><br />If you do not use this e-mail inbox for outgoing mail, this setting is unnecessary.<br />If you send e-mail without setting this, your 'From' header will'be set to match the setting `DEFAULT_FROM_EMAIL`.",
null=True,
verbose_name="From email",
),
),
(
"active",
models.BooleanField(
default=True,
help_text="Check this e-mail inbox for new e-mail messages during polling cycles. This checkbox does not have an effect upon whether mail is collected here when this mailbox receives mail from a pipe, and does not affect whether e-mail messages can be dispatched from this mailbox. ",
verbose_name="Active",
),
),
],
options={
"verbose_name_plural": "Mailboxes",
},
bases=(models.Model,),
),
migrations.CreateModel(
name="Message",
fields=[
(
"id",
models.AutoField(
verbose_name="ID",
serialize=False,
auto_created=True,
primary_key=True,
),
),
("subject", models.CharField(max_length=255, verbose_name="Subject")),
(
"message_id",
models.CharField(max_length=255, verbose_name="Message ID"),
),
(
"from_header",
models.CharField(max_length=255, verbose_name="From header"),
),
("to_header", models.TextField(verbose_name="To header")),
(
"outgoing",
models.BooleanField(default=False, verbose_name="Outgoing"),
),
("body", models.TextField(verbose_name="Body")),
(
"encoded",
models.BooleanField(
default=False,
help_text="True if the e-mail body is Base64 encoded",
verbose_name="Encoded",
),
),
(
"processed",
models.DateTimeField(auto_now_add=True, verbose_name="Processed"),
),
(
"read",
models.DateTimeField(
default=None, null=True, verbose_name="Read", blank=True
),
),
(
"in_reply_to",
models.ForeignKey(
related_name="replies",
verbose_name="In reply to",
blank=True,
to="django_mailbox.Message",
null=True,
on_delete=models.CASCADE,
),
),
(
"mailbox",
models.ForeignKey(
related_name="messages",
verbose_name="Mailbox",
to="django_mailbox.Mailbox",
on_delete=models.CASCADE,
),
),
],
options={},
bases=(models.Model,),
),
migrations.CreateModel(
name="MessageAttachment",
fields=[
(
"id",
models.AutoField(
verbose_name="ID",
serialize=False,
auto_created=True,
primary_key=True,
),
),
(
"headers",
models.TextField(null=True, verbose_name="Headers", blank=True),
),
(
"document",
models.FileField(
upload_to=b"mailbox_attachments/%Y/%m/%d/",
verbose_name="Document",
),
),
(
"message",
models.ForeignKey(
related_name="attachments",
verbose_name="Message",
blank=True,
to="django_mailbox.Message",
null=True,
on_delete=models.CASCADE,
),
),
],
options={},
bases=(models.Model,),
),
]

View file

@ -0,0 +1,22 @@
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="message",
name="eml",
field=models.FileField(
help_text="Original full content of message",
upload_to=b"messages",
null=True,
verbose_name="Message as a file",
),
preserve_default=True,
),
]

View file

@ -0,0 +1,21 @@
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0002_add_eml_to_message"),
]
operations = [
migrations.AlterField(
model_name="message",
name="eml",
field=models.FileField(
help_text="Original full content of message",
upload_to=b"messages",
null=True,
verbose_name="Raw message contents",
),
),
]

View file

@ -0,0 +1,28 @@
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0003_auto_20150409_0316"),
]
operations = [
migrations.AlterField(
model_name="message",
name="eml",
field=models.FileField(
verbose_name="Raw message contents",
upload_to="messages",
null=True,
help_text="Original full content of message",
),
),
migrations.AlterField(
model_name="messageattachment",
name="document",
field=models.FileField(
verbose_name="Document", upload_to="mailbox_attachments/%Y/%m/%d/"
),
),
]

View file

@ -0,0 +1,20 @@
from django.db import migrations, models
import django_mailbox.utils
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0004_bytestring_to_unicode"),
]
operations = [
migrations.AlterField(
model_name="messageattachment",
name="document",
field=models.FileField(
upload_to=django_mailbox.utils.get_attachment_save_path,
verbose_name="Document",
),
),
]

View file

@ -0,0 +1,23 @@
# Generated by Django 1.9.8 on 2016-08-15 22:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0005_auto_20160523_2240"),
]
operations = [
migrations.AddField(
model_name="mailbox",
name="last_polling",
field=models.DateTimeField(
blank=True,
help_text="The time of last successful polling for messages.It is blank for new mailboxes and is not set for mailboxes that only receive messages via a pipe.",
null=True,
verbose_name="Last polling",
),
),
]

View file

@ -0,0 +1,31 @@
# Generated by Django 1.10.7 on 2018-04-21 00:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0006_mailbox_last_polling"),
]
operations = [
migrations.AlterModelOptions(
name="mailbox",
options={"verbose_name": "Mailbox", "verbose_name_plural": "Mailboxes"},
),
migrations.AlterModelOptions(
name="message",
options={
"verbose_name": "E-mail message",
"verbose_name_plural": "E-mail messages",
},
),
migrations.AlterModelOptions(
name="messageattachment",
options={
"verbose_name": "Message attachment",
"verbose_name_plural": "Message attachments",
},
),
]

View file

@ -0,0 +1,30 @@
# Generated by Django 2.1.7 on 2019-02-19 14:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0007_auto_20180421_0026"),
]
operations = [
migrations.AlterField(
model_name="mailbox",
name="active",
field=models.BooleanField(
blank=True,
default=True,
help_text="Check this e-mail inbox for new e-mail messages during polling cycles. This checkbox does not have an effect upon whether mail is collected here when this mailbox receives mail from a pipe, and does not affect whether e-mail messages can be dispatched from this mailbox. ",
verbose_name="Active",
),
),
migrations.AlterField(
model_name="message",
name="outgoing",
field=models.BooleanField(
blank=True, default=False, verbose_name="Outgoing"
),
),
]

View file

@ -0,0 +1,24 @@
# Generated by Django 3.1.6 on 2021-02-07 02:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("django_mailbox", "0008_auto_20190219_1553"),
]
operations = [
migrations.AlterField(
model_name="message",
name="message_id",
field=models.CharField(
blank=None,
max_length=255,
null=None,
unique=True,
verbose_name="Message ID",
),
),
]

View file