You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/09/09 18:13:57 UTC
[allura] 01/01: [#8460] add new smtpclient method send_raw which sends pre-formatted email content
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch dw/8460
in repository https://gitbox.apache.org/repos/asf/allura.git
commit fd84695b1b5c34d69024bf0b1dadf9072dbf4235
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Sep 7 14:37:47 2022 +0000
[#8460] add new smtpclient method send_raw which sends pre-formatted email content
---
Allura/allura/lib/mail_util.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index 374cb25ef..2caef5c26 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -301,11 +301,15 @@ class SMTPClient:
log.warning('No valid addrs in %s, so not sending mail',
list(map(str, addrs)))
return
+
+ self.send_raw(config.return_path, smtp_addrs, content)
+
+ def send_raw(self, addr_from, smtp_addrs, content):
if not self._client:
self._connect()
try:
self._client.sendmail(
- config.return_path,
+ addr_from,
smtp_addrs,
content)
need_retry = False
@@ -322,7 +326,7 @@ class SMTPClient:
# maybe could sleep? or if we're in a task, reschedule it somehow?
self._connect()
self._client.sendmail(
- config.return_path,
+ addr_from,
smtp_addrs,
content)