Eric,
at first, that looks like a duplication of code. Could you elaborate why
you use both of these hooks?
Gregor
* Eric Sherman <[email protected]> [Di Jun 08 13:57:54 +0200 2010]
> Excerpts from Daniel Goldin's message of Tue Jun 08 01:16:25 -0400 2010:
> > Thanks so much, works like a charm. But is there a way to change the
> > "From:" and "In-reply-to:" and "Reply-to:" headers without having to add
> > the config option ":ask_for_from: true"?
>
> You may use the before-edit and reply-from hooks. Here are scrubbed
> versions of mine:
>
> before-edit.rb:
> if header["To"] =~ /megacorp|ultramegacorp|alternacorp|minicorp|othercorp/
> header["From"] = "me <[email protected]>"
> elsif header["To"] =~ /somelist|alternalist|otherlist/
> header["From"] = "me <[email protected]>"
> end
> header["Bcc"] = header["From"]
>
> reply-from.rb:
> val = case [message.recipient_email, message.to, message.cc,
> message.from].flatten.to_s
> when /megacorp|ultramegacorp|alternacorp|minicorp|othercorp/ then "me
> <[email protected]>"
> when /personal.org/ then "me <[email protected]>"
> when /nerdylistemail.org|somelist|alternalist|otherlist/ then "me
> <[email protected]>"
> when /newemail/ then "me <[email protected]>"
> when /oldemail/ then "me <[email protected]>"
> end
> Person.from_address val
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk