aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2008-07-11 21:02:12 +0000
committerVincent Richard <[email protected]>2008-07-11 21:02:12 +0000
commitad0ea8ce9fdaab25c5de22456571ebf4c93050e9 (patch)
tree25cf4b9bd57e4a4c6c5557ebb57f0ace9eb2bc3a
parentRecover from broken emails without a final boundary (Zarafa). (diff)
downloadvmime-ad0ea8ce9fdaab25c5de22456571ebf4c93050e9.tar.gz
vmime-ad0ea8ce9fdaab25c5de22456571ebf4c93050e9.zip
Remove BCC headers before sending the message over SMTP (Zarafa).
-rw-r--r--src/net/transport.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/transport.cpp b/src/net/transport.cpp
index 18bf4773..3c8536ab 100644
--- a/src/net/transport.cpp
+++ b/src/net/transport.cpp
@@ -98,6 +98,16 @@ void transport::send(ref <vmime::message> msg, utility::progressListener* progre
}
catch (exceptions::no_such_field&) { }
+ // Remove BCC headers from the message we're about to send, as required by the RFC.
+ // Some SMTP server automatically strip this header (Postfix, qmail), and others
+ // have an option for this (Exim).
+ try
+ {
+ ref <headerField> bcc = msg->getHeader()->findField(fields::BCC);
+ msg->getHeader()->removeField(bcc);
+ }
+ catch (exceptions::no_such_field&) { }
+
// Generate the message, "stream" it and delegate the sending
// to the generic send() function.
std::ostringstream oss;