Excerpts from Steve Goldman's message of Wed Jul 22 21:10:41 -0400 2009:
>
> Here's what I want:
>
> After I compose an email (new or a reply), I want sup to grep the
> entire message (recipients, subject, body, etc.) for a single word and
> choose address A if that word is there and address B otherwise.
>
> Can sup do it?
>
> Thanks.
>
I think I answered my own question.
I added an "after-edit" hook call in edit-message-mode.rb and wrote a
hook that looks like this:
require 'eregex'
r = Regexp.new('word', Regexp::IGNORECASE);
if header.to_s.grep(r).size > 0 or body.to_s.grep(r).size > 0
header["From"] = "Steve Goldman <[email protected]>"
end
--
Steve Goldman
[email protected]
T: 212.219.6014
F: 212.219.6007
Tower Research Capital, LLC
377 Broadway, 11th Fl.
New York, NY 10013
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk