aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPTransport.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-07-24 13:30:57 +0200
committerVincent Richard <[email protected]>2013-07-24 13:30:57 +0200
commit820d44377e20c3a2ea31f848636c6f49877bdf7b (patch)
tree6ed1535f8a5438b065c7da62ee0fd82889d4f7c9 /src/net/smtp/SMTPTransport.cpp
parentReturn real message UID from IMAP server. Added function to return the curren... (diff)
downloadvmime-820d44377e20c3a2ea31f848636c6f49877bdf7b.tar.gz
vmime-820d44377e20c3a2ea31f848636c6f49877bdf7b.zip
Added SMTP service properties to allow disabling PIPELINING and CHUNKING extensions.
Diffstat (limited to 'src/net/smtp/SMTPTransport.cpp')
-rw-r--r--src/net/smtp/SMTPTransport.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index 46e47f35..c3431a43 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -169,7 +169,9 @@ void SMTPTransport::sendEnvelope
const bool needReset = m_needReset;
- const bool hasPipelining = m_connection->hasExtension("PIPELINING");
+ const bool hasPipelining = m_connection->hasExtension("PIPELINING") &&
+ getInfos().getPropertyValue <bool>(getSession(),
+ dynamic_cast <const SMTPServiceInfos&>(getInfos()).getProperties().PROPERTY_OPTIONS_PIPELINING);
ref <SMTPResponse> resp;
ref <SMTPCommandSet> commands = SMTPCommandSet::create(hasPipelining);
@@ -334,7 +336,10 @@ void SMTPTransport::send
// If CHUNKING is not supported, generate the message to a temporary
// buffer then use the send() method which takes an inputStream
- if (!m_connection->hasExtension("CHUNKING"))
+ if (!m_connection->hasExtension("CHUNKING") ||
+ !getInfos().getPropertyValue <bool>(getSession(),
+ dynamic_cast <const SMTPServiceInfos&>(getInfos()).getProperties().PROPERTY_OPTIONS_CHUNKING))
+
{
std::ostringstream oss;
utility::outputStreamAdapter ossAdapter(oss);