Changed BaseEmail to accept from_address to modify the from header accordingly
This commit is contained in:
parent
a44f64e8e7
commit
a60ef7cf7a
2 changed files with 10 additions and 1 deletions
|
|
@ -21,7 +21,10 @@ class BaseEmail(object):
|
|||
|
||||
self.email = EmailMultiAlternatives(self.subject, text_content)
|
||||
self.email.attach_alternative(html_content, "text/html")
|
||||
self.email.from_email = '(ungleich) ungleich Support <info@ungleich.ch>'
|
||||
if 'from_address' in kwargs:
|
||||
self.email.from_email = kwargs.get('from_address')
|
||||
else:
|
||||
self.email.from_email = '(ungleich) ungleich Support <info@ungleich.ch>'
|
||||
self.email.to = [kwargs.get('to', 'info@ungleich.com')]
|
||||
|
||||
def send(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue