<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to patches</title><link href="https://sourceforge.net/p/elspy/patches/" rel="alternate"/><link href="https://sourceforge.net/p/elspy/patches/feed.atom" rel="self"/><id>https://sourceforge.net/p/elspy/patches/</id><updated>2004-06-09T22:19:42Z</updated><subtitle>Recent changes to patches</subtitle><entry><title>match_recipients() utility function</title><link href="https://sourceforge.net/p/elspy/patches/1/" rel="alternate"/><published>2004-06-09T22:19:42Z</published><updated>2004-06-09T22:19:42Z</updated><author><name>Greg Ward</name><uri>https://sourceforge.net/u/gward/</uri></author><id>https://sourceforge.net30314a839c958069b598d28be65b033cd6a49f06</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;From an elspy-users post by Andrew Kuchling:&lt;/p&gt;
&lt;p&gt;I've found the following function handy for checking if&lt;br /&gt;
a given recipient is&lt;br /&gt;
present in the envelope-to.  Perhaps it's a candidate&lt;br /&gt;
for the elspy library?&lt;/p&gt;
&lt;p&gt;Examples:&lt;br /&gt;
To reject all mail which is addressed to&lt;br /&gt;
spamtrap@example.com.&lt;/p&gt;
&lt;p&gt;if match_recipients(info.recipients_list,&lt;br /&gt;
'spamtrap', 'example.com'):&lt;br /&gt;
raise RejectMessage("Spam not wanted here")&lt;/p&gt;
&lt;p&gt;To allow only 'barb' and 'amk' local parts:&lt;/p&gt;
&lt;p&gt;info.recipients_list =&lt;br /&gt;
match_recipients(info.recipients_list,&lt;br /&gt;
['barb', 'amk'],&lt;br /&gt;
'example.com')&lt;/p&gt;
&lt;p&gt;--amk&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>