[Zope-Checkins] CVS: Zope/lib/python/Products/MailHost/tests - testMailHost.py:1.4
Shane Hathaway
shane@zope.com
Tue, 4 Mar 2003 11:29:15 -0500
Update of /cvs-repository/Zope/lib/python/Products/MailHost/tests
In directory cvs.zope.org:/tmp/cvs-serv961/tests
Modified Files:
testMailHost.py
Log Message:
Restored MailHost's ability to send bulk emails using the "Bcc" header to
avoid disclosing the recipients.
=== Zope/lib/python/Products/MailHost/tests/testMailHost.py 1.3 => 1.4 ===
--- Zope/lib/python/Products/MailHost/tests/testMailHost.py:1.3 Wed Aug 14 18:14:52 2002
+++ Zope/lib/python/Products/MailHost/tests/testMailHost.py Tue Mar 4 11:29:13 2003
@@ -47,6 +47,14 @@
self.failUnless(resto == ['recipient2@domain.com'])
self.failUnless(resfrom == 'sender2@domain.com' )
+ def testBCCHeader( self ):
+ msg = "From: me@example.com\nBcc: many@example.com\n\nMessage text"
+ # Specify only the "Bcc" header. Useful for bulk emails.
+ resmsg, resto, resfrom = _mungeHeaders(msg)
+ self.failUnless(resto == ['many@example.com'])
+ self.failUnless(resfrom == 'me@example.com' )
+
+
def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestMailHost ) )