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 <ma...@widgets.com>" else to = header["To"] info "Sending as pobox, to = #{to}" header["From"] = "Mark Alexander <ma...@pobox.com>" end end But the hook didn't work; the account selector was changing the From: address back to ma...@pobox.com even after the hook had set it to ma...@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