From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.52.236.136 with SMTP id uu8csp55885vdc; Wed, 17 Apr 2013 03:23:37 -0700 (PDT) X-Received: by 10.236.84.195 with SMTP id s43mr3291588yhe.105.1366194217668; Wed, 17 Apr 2013 03:23:37 -0700 (PDT) Return-Path: Received: from rubyforge.org ([50.56.192.79]) by mx.google.com with ESMTP id o27si5802212yhn.57.2013.04.17.03.23.37; Wed, 17 Apr 2013 03:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org; dkim=neutral (bad format) header.i=@gmail.com Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 0161B2E120; Wed, 17 Apr 2013 10:23:38 +0000 (UTC) X-Greylist: delayed 159252 seconds by postgrey-1.31 at rubyforge; Wed, 17 Apr 2013 10:22:12 UTC Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by rubyforge.org (Postfix) with ESMTP id 76BCB2E11C for ; Wed, 17 Apr 2013 10:22:12 +0000 (UTC) Received: by mail-vb0-f48.google.com with SMTP id p13so1129894vbe.35 for ; Wed, 17 Apr 2013 03:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:content-type:from:to:subject:in-reply-to :references:date:message-id:user-agent:content-transfer-encoding; bh=cTbbie9czpLLl5IFjTvnHMoLHSt8XYtF7UqGE2DUTnM=; b=VZCIvG0xzABxAngluPE6bNf5ewtyxDptRTnKVYoERZatCg9gxK6RmaXmnLG3ih7H6z /hDZCbSZNNjqAVyvfTlCTsO2HFwoN4vZtPr5Ag972h2Hiqpp6A8K/gEgHpcXHhY3O+h+ yTxeUAJrnbnW1PRHoixSwpxjk/VK0UGj0ihRPER6qZq7UnIkntd5C2YHMpaUHc1iNt0J JvOT+jy0e/uJBjTk3NDPM/wsLoKcwH+dBtd9mvVbQGLR0FcFVXjVzyhpaV3AOTof+Xl+ au4K7FPXiuRCxdxeO0jluMRZnnKcQX2m9NQOEMXhZifqISgQAz85TR+wu8CYG3nctM6H xcyQ== X-Received: by 10.58.213.37 with SMTP id np5mr4222001vec.54.1366194131508; Wed, 17 Apr 2013 03:22:11 -0700 (PDT) Received: from localhost (c-76-19-85-15.hsd1.vt.comcast.net. [76.19.85.15]) by mx.google.com with ESMTPS id q5sm5069816vdj.5.2013.04.17.03.22.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 17 Apr 2013 03:22:10 -0700 (PDT) From: Mark Alexander To: sup-talk In-reply-to: <1366034093-sup-2478@x200s> References: <1366034093-sup-2478@x200s> Date: Wed, 17 Apr 2013 06:22:08 -0400 Message-Id: <1366193674-sup-848@x200s> User-Agent: Sup/git Subject: Re: [sup-talk] [PATCH] Fix problem with account selector X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org 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 " else to = header["To"] info "Sending as pobox, to = #{to}" header["From"] = "Mark Alexander " 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