mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
add feature to consume imap mail als .eml
This commit is contained in:
parent
5fcf1b5434
commit
cca576f518
4 changed files with 149 additions and 62 deletions
|
|
@ -56,6 +56,14 @@ class MailRule(models.Model):
|
|||
verbose_name = _("mail rule")
|
||||
verbose_name_plural = _("mail rules")
|
||||
|
||||
class ConsumptionScope(models.IntegerChoices):
|
||||
ATTACHMENTS_ONLY = 1, _("Only process attachments.")
|
||||
EML_ONLY = 2, _("Process full Mail (with embedded attachments in file) as .eml")
|
||||
EVERYTHING = 3, _(
|
||||
"Process full Mail (with embedded attachments in file) as .eml "
|
||||
"+ process attachments as separate documents",
|
||||
)
|
||||
|
||||
class AttachmentProcessing(models.IntegerChoices):
|
||||
ATTACHMENTS_ONLY = 1, _("Only process attachments.")
|
||||
EVERYTHING = 2, _("Process all files, including 'inline' " "attachments.")
|
||||
|
|
@ -144,6 +152,12 @@ class MailRule(models.Model):
|
|||
),
|
||||
)
|
||||
|
||||
consumption_scope = models.PositiveIntegerField(
|
||||
_("consumption scope"),
|
||||
choices=ConsumptionScope.choices,
|
||||
default=ConsumptionScope.ATTACHMENTS_ONLY,
|
||||
)
|
||||
|
||||
action = models.PositiveIntegerField(
|
||||
_("action"),
|
||||
choices=AttachmentAction.choices,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue