Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Mark Alexander <marka@pobox.com>
To: Hamish D <dmishd@gmail.com>
Cc: sup-talk <sup-talk@rubyforge.org>,
	Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [sup-talk] Preparing for sup 0.13
Date: Wed, 19 Oct 2011 10:31:29 -0400	[thread overview]
Message-ID: <1319034152-sup-5416@bloovis.org> (raw)
In-Reply-To: <CAOxvSbcBz11N1Ac_fr970dPRqDv=e89xzicZoLbH+zTSJTEpcg@mail.gmail.com>

Excerpts from Hamish D's message of Sun Oct 16 08:09:41 -0400 2011:
> * added an account selector when composing email for those who have
> multiple possible from addresses

I'm having a problem with this feature, too.

I have two main email accounts, one for personal email and one for
work email.  My before-edit.rb hook figures out which account to use
as the sender (the "From" header) by looking at the recipients (the
"To" header).  This worked with sup 0.12, but with 0.13 the sender is
changed back to the default as soon as I exit the editor.

I see that Sascha Silbe said something about this seven months ago:

> This one would possibly break my workflow. My From address is chosen in
> the before-edit hook based on the set of recipients. Since you only
> call before-edit once with headers_full as headers, whatever From
> address gets chosen for the initial reply mode will "stick".

Here's the sanitized before-edit.rb hook, in case that helps:

unless header["In-reply-to"]
  if header["To"] =~ /widgets/
    to = header["To"]
    info "Sending as widgets, to = #{to}"
    header["From"] = "Mark Alexander <marka@widgets.com>"
  else
    to = header["To"]
    info "Sending as pobox, to = #{to}"
    header["From"] = "Mark Alexander <marka@pobox.com>"
  end
end
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


  parent reply	other threads:[~2011-10-19 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 12:09 Hamish D
2011-10-18 13:46 ` [sup-devel] " Mark Alexander
2011-10-18 17:58   ` Hamish D
2011-10-19 14:31 ` Mark Alexander [this message]
2011-10-20 13:18   ` [sup-devel] " Mark Alexander

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=1319034152-sup-5416@bloovis.org \
    --to=marka@pobox.com \
    --cc=dmishd@gmail.com \
    --cc=sup-devel@rubyforge.org \
    --cc=sup-talk@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