Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Michael Stapelberg <michael+sup@stapelberg.de>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] Use the configured real name combined with the actual email address as Sender when replying
Date: Tue, 27 Jul 2010 14:54:57 +0200	[thread overview]
Message-ID: <1280235249-sup-8730@midna.zekjur.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Hi,

quote from the commit message:
	For example, mails with "To: michael+sup@stapelberg.de" don't get the
	sender "michael+sup <michael+sup@stapelberg.de>" anymore but
	"Michael Stapelberg <michael+sup@stapelberg.de>"

Best regards,
Michael

[-- Attachment #2: 0001-Use-the-configured-real-name-combined-with-the-actua.patch --]
[-- Type: application/octet-stream, Size: 1313 bytes --]

From f8be268c221f666d4db4eb09c0f547d76df511bb Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Tue, 27 Jul 2010 14:37:01 +0200
Subject: [PATCH] Use the configured real name combined with the actual email address as Sender when replying

For example, mails with "To: michael+sup@stapelberg.de" don't get the
sender "michael+sup <michael+sup@stapelberg.de>" anymore but
"Michael Stapelberg <michael+sup@stapelberg.de>"
---
 lib/sup/modes/reply-mode.rb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index bbac922..74ffe5d 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -76,7 +76,11 @@ EOS
     ## otherwise, try and find an account somewhere in the list of to's
     ## and cc's.
     elsif(b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p })
-      b
+      ## Because people do not always include the full name in the recipient
+      ## field of their mails, we compose the configured realname of this
+      ## account with the email address the mail was sent to
+      acc = AccountManager.account_for b.email
+      Person.new acc.name, b.email
     ## if all else fails, use the default
     else
       AccountManager.default_account
-- 
1.7.1


[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

             reply	other threads:[~2010-07-27 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27 12:54 Michael Stapelberg [this message]
2010-07-27 16:16 ` Robin Burchell
2010-07-27 16:38   ` Michael Stapelberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280235249-sup-8730@midna.zekjur.net \
    --to=michael+sup@stapelberg.de \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox