From: Philippe LeCavalier <support@plecavalier.com>
To: David J. Hamilton <groups@hjdivad.com>
Cc: sup-talk@rubyforge.org
Subject: Re: [sup-talk] hook with external file ref
Date: Tue, 08 Mar 2011 21:13:26 -0500 [thread overview]
Message-ID: <1299636520-sup-7694@plc.intranet.plecavalier.com> (raw)
In-Reply-To: <1299618530-sup-9754@nyx.local>
Hi David.
Excerpts from David J. Hamilton's message of Tue Mar 08 16:16:00 -0500 2011:
> Hi Philippe,
>
> Excerpts from Philippe LeCavalier's message of Fri Mar 04 06:06:17 -0800 2011:
> > Hi David.
> > I'm getting "undetermined quoted string" with the above code. Any ideas?
>
> Sorry for the late reply. I don't see what in the above code would give you
> that error.
It's quite possible it's something unrelated to that hook.
> Could you please post your complete before-add-message.rb file?
Since I have yet to settle on a "style" of code for this hook I'm only
playing around with different options. As such, I only apply them 1 at a
time. At the moment I only have your example in there.
> Your addressfile is just a list of domains right? Something like:
>
> gmail.com
> somewhereelse.net
> example.org
Yup. Exactly.
>
> One more thing: the code I originally posted does contain an error: you want to
> use /#{pattern.chomp}/ rather than /#{pattern}/. So, for example, if your
> addressfile was in /tmp/addressfile you would have:
>
> patterns = File.readlines "/tmp/addressfile"
> patterns.each do |pattern|
> if message.from.email =~ /#{pattern.chomp}/
> message.add_label :somelabel
> end
> end
I'll try the above. Perhaps that will "settle" things. Back in a bit
once I have a chance to test that.
Thanks again David.
--
Thanks,
Phil
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2011-03-09 2:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 13:26 Philippe LeCavalier
2011-03-03 17:35 ` David J. Hamilton
2011-03-03 19:12 ` Philippe LeCavalier
2011-03-04 14:06 ` Philippe LeCavalier
[not found] ` <1299618530-sup-9754@nyx.local>
2011-03-09 2:13 ` Philippe LeCavalier [this message]
2011-03-10 14:13 ` Philippe LeCavalier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299636520-sup-7694@plc.intranet.plecavalier.com \
--to=support@plecavalier.com \
--cc=groups@hjdivad.com \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox