Modified one call and one exception point related to on_behalf_of() use for email sending.
- Legacy-Id: 16008
This commit is contained in:
parent
8a669909bc
commit
d57088b1f3
|
@ -8,7 +8,7 @@ from ietf.message.models import AnnouncementFrom
|
|||
from ietf.ietfauth.utils import has_role
|
||||
from ietf.secr.announcement.forms import AnnounceForm
|
||||
from ietf.secr.utils.decorators import check_for_cancel
|
||||
from ietf.utils.mail import send_mail_text, on_behalf_of
|
||||
from ietf.utils.mail import send_mail_text, maybe_on_behalf_of
|
||||
|
||||
# -------------------------------------------------
|
||||
# Helper Functions
|
||||
|
@ -83,7 +83,7 @@ def confirm(request):
|
|||
extra = {'Reply-To':message.reply_to}
|
||||
send_mail_text(None,
|
||||
message.to,
|
||||
on_behalf_of(message.frm),
|
||||
maybe_on_behalf_of(message.frm),
|
||||
message.subject,
|
||||
message.body,
|
||||
cc=message.cc,
|
||||
|
|
|
@ -191,7 +191,8 @@ def on_behalf_of(frm):
|
|||
name, addr = parseaddr(frm)
|
||||
domain = addr.rsplit('@', 1)[-1]
|
||||
if domain in settings.UTILS_FROM_EMAIL_DOMAINS:
|
||||
raise ValueError("Using send_mail_on_behalf_of() with an address (%s) in %s is misleading. Please use send_mail()" % (addr, settings.UTILS_FROM_EMAIL_DOMAINS))
|
||||
unreachable('2019-03-06')
|
||||
return frm
|
||||
if not name:
|
||||
name = addr
|
||||
name = "Datatracker on behalf of %s" % name
|
||||
|
|
Loading…
Reference in a new issue