You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/11/08 05:21:14 UTC

[4/6] git commit: [#6694] ticket:461 If there is one receiver, use his address in 'To:'

[#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 <je...@gmail.com>
Authored: Mon Nov 4 08:42:07 2013 +0000
Committer: Igor Bondarenko <je...@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)