allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [4/6] git commit: [#6694] ticket:461 If there is one receiver, use his address in 'To:'
Date Fri, 08 Nov 2013 04:21:14 GMT
[#6694] ticket:461 If there is one receiver, use his address in 'To:'


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e9bb84fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e9bb84fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e9bb84fb

Branch: refs/heads/tv/6694
Commit: e9bb84fb353c0957aeb93882dd012a6f857e80af
Parents: 9dc9a36
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Nov 4 08:42:07 2013 +0000
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Mon Nov 4 08:42:07 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/mail_util.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e9bb84fb/Allura/allura/lib/mail_util.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index d952e15..70caedc 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -186,7 +186,10 @@ class SMTPClient(object):
         if not addrs: return
         # We send one message with multiple envelope recipients, so use a generic To: addr
         # It might be nice to refactor to send one message per recipient, and use the actual
To: addr
-        message['To'] = Header(reply_to)
+        if len(addrs) == 1:
+            message['To'] = AddrHeader(addrs[0])
+        else:
+            message['To'] = Header(reply_to)
         message['From'] = AddrHeader(fromaddr)
         message['Reply-To'] = Header(reply_to)
         message['Subject'] = Header(subject)


Mime
View raw message