Allow distinct FROM addresses for envelope and header
issue9948 review324741004
This commit is contained in:
1 parent
230c9fbdf4
commit
e45c26665c
1 file changed
+3
-4
@@ -40,14 +40,13 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _send_email(from_, users, email_func):
|
||||
if from_ is None:
|
||||
from_ = config.get('email', 'from')
|
||||
from_cfg = config.get('email', 'from')
|
||||
for user in users:
|
||||
msg, title = email_func(user)
|
||||
msg['From'] = from_
|
||||
msg['From'] = from_ or from_cfg
|
||||
msg['To'] = user.email
|
||||
msg['Subject'] = Header(title, 'utf-8')
|
||||
sendmail_transactional(from_, [user.email], msg)
|
||||
sendmail_transactional(from_cfg, [user.email], msg)
|
||||
|
||||
|
||||
def _add_params(url, **params):
|
||||
|
||||
Reference in new issue
Block a user