w00t, I finally switched to sup (and this is my first mail to the list using it). I still have a little problem about filters though. they don''t seem to do anything. I have this in my before-add-message.rb : message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/ but, when I send mail to myself, it doesn''t label the mail. I know that it reads the hook (tried some say + sleep calls), but for a reason I don''t understand it does nothing. and yes, this time, I read the FAQ before ;-) -- Guillaume
Reformatted excerpts from Guillaume Quintard''s message of 2008-02-23:> I still have a little problem about filters though. they don''t seem to > do anything. I have this in my before-add-message.rb : > > message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/ > > but, when I send mail to myself, it doesn''t label the mail.Yep, there was a bug where the before-add-message hook wasn''t being called on sent messages. I''ve fixed this in git next. Update and try now. But you shouldn''t have to write that hook, because the sent label is applied to all sent messages anyways! (Also, you''d need to use message.from.email because message.from is a Person object). -- William <wmorgan-sup at masanjin.net>
Excerpts from William Morgan''s message of Sun Feb 24 14:58:00 -0800 2008:> But you shouldn''t have to write that hook, because the sent label is > applied to all sent messages anyways! >actually, the idea was to label mail sent by me from gmail.> (Also, you''d need to use message.from.email because message.from is a > Person object).message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/ doesn''t seem to do a thing either :-( -- Guillaume
Reformatted excerpts from guillaume.quintard''s message of 2008-02-24:> message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/ > doesn''t seem to do a thing either :-(That should work. What if you add some logging information, like: log "called" log "email is #{message.from.email.inspect}" match = message.from.email =~ /guillaume\.quintard at gmail\.com/ log "match is #{match.inspect}" message.add_label :test if match log "message labels now #{message.labels.inspect}" -- William <wmorgan-sup at masanjin.net>
ok, I got it, this line was causing problem : message.add_label "server" if message.from.email =~ /@server.com/ replacing @ with \@ did the trick thanks ! PS : in fact, I''d have another questio : is there an way to switch the "from" field, like it is done in gmail ? I entered two additionnal email addresses with sup-config but found no option to use them. anyway, kudos to you people, sup is really great ! -- Guillaume
Reformatted excerpts from kingshivan''s message of 2008-02-24:> ok, I got it, this line was causing problem : > message.add_label "server" if message.from.email =~ /@server.com/ > > replacing @ with \@ did the trickWeird. That shouldn''t make a difference. @ doesn''t require escaping in regexes. E.g.: $ irb irb(main):001:0> "bob at server.com" =~ /@server.com/ => 3 irb(main):002:0> "bob at server.com" =~ /\@server.com/ => 3 Well, if it works, it works.> PS : in fact, I''d have another questio : is there an way to switch the > "from" field, like it is done in gmail ? I entered two additionnal > email addresses with sup-config but found no option to use them.There''s no way in the GUI, at least currently. I would like to have a way, but I''m not sure what the interface would look like. You have two options: you can overwrite the From: line in the editor when you compose an email, or you can use the before-edit hook to programmatically set the From address based on the to address, etc. -- William <wmorgan-sup at masanjin.net>
Excerpts from William Morgan''s message of Mon Feb 25 09:02:19 -0800 2008:> There''s no way in the GUI, at least currently. I would like to have a > way, but I''m not sure what the interface would look like.why not using the same bar as for encryption, and reply-to choices ? -- Guillaume
Reformatted excerpts from Guillaume Quintard''s message of 2008-02-25:> Excerpts from William Morgan''s message of Mon Feb 25 09:02:19 -0800 2008: > > There''s no way in the GUI, at least currently. I would like to have > > a way, but I''m not sure what the interface would look like. > > why not using the same bar as for encryption, and reply-to choices ?Well, the user might have 20 different accounts... horizontal scrolling just isn''t going to cut it. Now that I''ve thought about it, the right interface is probably to have a keystroke in edit-message-mode that brings up a modal buffer with a list of all your account default email addresses and allows you to select one. Then we can leverage Sup''s existing "vertical scrolling technology". Patches welcome. :) -- William <wmorgan-sup at masanjin.net>