Add option for smtp without encryption

This commit is contained in:
Eduardo Silva 2025-03-12 21:13:22 -03:00
parent 100a7e11dc
commit 05e0f1e270
3 changed files with 25 additions and 4 deletions

View file

@ -1,6 +1,7 @@
from django.db import models
import uuid
from django.db import models
class EmailSettings(models.Model):
name = models.CharField(default='email_settings', max_length=20, unique=True)
@ -8,7 +9,7 @@ class EmailSettings(models.Model):
smtp_password = models.CharField(max_length=100, blank=True, null=True)
smtp_host = models.CharField(max_length=100, blank=True, null=True)
smtp_port = models.IntegerField(default=587)
smtp_encryption = models.CharField(default='tls', choices=(('ssl', 'SSL'), ('tls', 'TLS')), max_length=3)
smtp_encryption = models.CharField(default='tls', choices=(('ssl', 'SSL'), ('tls', 'TLS'), ('none', 'None (Insecure)'), ('noauth', 'No authentication (Insecure)')), max_length=6)
smtp_from_address = models.EmailField(blank=True, null=True)
enabled = models.BooleanField(default=True)