From: Mark Alexander <marka@pobox.com>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] [PATCH] Fix problem with account selector
Date: Wed, 17 Apr 2013 06:22:08 -0400 [thread overview]
Message-ID: <1366193674-sup-848@x200s> (raw)
In-Reply-To: <1366034093-sup-2478@x200s>
I should probably explain the rationale behind this patch.
For a couple of years I used a single instance of sup to handle email
for two different accounts: one for personal email, and the other for
work email. When I sent a message to somebody at work, I wanted the
From: address to be set automatically to my work email address.
Otherwise I wanted the From: address to be set to my personal email
address. To do this I wrote a before-edit hook that looked like this
(with my company name changed to "widgets"):
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
But the hook didn't work; the account selector was changing the From:
address back to marka@pobox.com even after the hook had set it to
marka@widgets.com. The fix was to run the hook before the account
selector was initialized.
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
prev parent reply other threads:[~2013-04-17 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 14:01 Mark Alexander
2013-04-17 10:22 ` Mark Alexander [this message]
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=1366193674-sup-848@x200s \
--to=marka@pobox.com \
--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