[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sup-talk] best method for before-add-message.rb
Hi. I apologize in advance for the broken thread...Since I forgot a linebreak at the beginning of the body so everything got mangled upon exiting vim. I did my best to re-create the order.
Excerpts from Mark Alexander's message of Thu Feb 10 12:00:17 -0500 2011:
> Excerpts from Philippe LeCavalier's message of Thu Feb 10 11:52:53 -0500 2011:
> > Hi Mark.
> > Have you tried?
> > > > case message.subj
> > when /\[P4 SUBMIT/
> > message.add_label :p4
> > message.remove_label :inbox
> > end
> > No, I haven't tried remove_label.
I did some testing and for some reason I cannot see, the above code automatically archives the msg without any obvious code telling sup to do so.
If I:
case message.from.email
when /@plecavalier.com/
message.add_label :TEST
message.add_label :TEST2
message.add_label :TEST3
end
tests sent to myself are respectively labeled TEST TEST2 TEST3 but are also striped of the inbox label. Since this is exactly what I want this works for me but...
--
Thanks,
Phil
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk