Index: /main/waeup.kofa/trunk/src/waeup/kofa/smtp.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/smtp.py	(revision 11777)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/smtp.py	(revision 11778)
@@ -160,5 +160,5 @@
 
 def send_mail(from_name, from_addr, rcpt_name, rcpt_addrs,
-              subject, body, config=None):
+              subject, body, config=None, cc=False):
     """Send mail.
 
@@ -167,9 +167,13 @@
 
     Please note: the `from_addr` given will be used for the reply-to
-    and cc field only. It will _not_ be used for the `from` field, as
-    yahoo does not allow non-yahoo servers to deliver mail with
+    (and cc) field only. It will _not_ be used for the `from` field,
+    as yahoo does not allow non-yahoo servers to deliver mail with
     ``@yahoo.com`` in the from-field.
 
     The from-address set here will be: `FROM_ADDRESS` as set above.
+
+    ``cc`` tells whether we want the from-address to be CCed. This is
+    not the case by default as we easily act as an open relay
+    otherwise.
 
     XXX: The hard-coded from-address should be changable or be
@@ -187,5 +191,7 @@
     body["From"] = sender_addr
     body["To"] = body_to.strip(', ')
-    body["Cc"] = body["Reply-To"] = reply_addr
+    if cc:
+        body["Cc"] = reply_addr
+    body["Reply-To"] = reply_addr
     body["Subject"] = encode_header_item(subject)
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py	(revision 11777)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py	(revision 11778)
@@ -244,4 +244,32 @@
              u'msg: From: A sender <no-reply@waeup.org>',
              u'msg: To: A recipient <recpt@example.com>',
+             # u'msg: Cc: A sender <sender@example.com>',
+             u'msg: Reply-To: A sender <sender@example.com>',
+             u'msg: Subject: A subject',
+             u'msg: ',
+             u'msg: This is a test mail.',
+             u'']
+            )
+        return
+
+    def test_send_mail_with_cc(self):
+        # with cc=True the message will be CCed to the from address
+        mail_id = send_mail(
+            u'A sender', u'sender@example.com',
+            u'A recipient', u'recpt@example.com',
+            u'A subject',
+            u'This is a test mail.',
+            cc=True)
+        self.assertEqual(mail_id, 'fake-message-id@example.com')
+        self.assertEqual(
+            self.get_fake_smtp_output().split('\n'),
+            [u'Sending email from no-reply@waeup.org to '
+             u'recpt@example.com, sender@example.com:',
+             u'Message:',
+             u'msg: MIME-Version: 1.0',
+             u'msg: Content-Type: text/plain; charset="us-ascii"',
+             u'msg: Content-Transfer-Encoding: 7bit',
+             u'msg: From: A sender <no-reply@waeup.org>',
+             u'msg: To: A recipient <recpt@example.com>',
              u'msg: Cc: A sender <sender@example.com>',
              u'msg: Reply-To: A sender <sender@example.com>',
@@ -270,5 +298,5 @@
              u'msg: From: A sender <no-reply@waeup.org>',
              u'msg: To: A recipient <recpt@example.com>',
-             u'msg: Cc: A sender <sender@example.com>',
+             # u'msg: Cc: A sender <sender@example.com>',
              u'msg: Reply-To: A sender <sender@example.com>',
              u'msg: Subject: A subject',
@@ -296,5 +324,5 @@
              u'msg: From: A sender <no-reply@waeup.org>',
              u'msg: To: A recipient <recpt@example.com>',
-             u'msg: Cc: A sender <sender@example.com>',
+             # u'msg: Cc: A sender <sender@example.com>',
              u'msg: Reply-To: A sender <sender@example.com>',
              u'msg: Subject: A subject',
