aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/smtp/SMTPConnection.cpp')
-rw-r--r--src/net/smtp/SMTPConnection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net/smtp/SMTPConnection.cpp b/src/net/smtp/SMTPConnection.cpp
index c5ec7b51..88170243 100644
--- a/src/net/smtp/SMTPConnection.cpp
+++ b/src/net/smtp/SMTPConnection.cpp
@@ -29,6 +29,7 @@
#include "vmime/net/smtp/SMTPConnection.hpp"
#include "vmime/net/smtp/SMTPTransport.hpp"
+#include "vmime/net/smtp/SMTPExceptions.hpp"
#include "vmime/exception.hpp"
#include "vmime/platform.hpp"
@@ -473,7 +474,10 @@ void SMTPConnection::startTLS()
ref <SMTPResponse> resp = readResponse();
if (resp->getCode() != 220)
- throw exceptions::command_error("STARTTLS", resp->getText());
+ {
+ throw SMTPCommandError("STARTTLS", resp->getText(),
+ resp->getCode(), resp->getEnhancedCode());
+ }
ref <tls::TLSSession> tlsSession =
tls::TLSSession::create(getTransport()->getCertificateVerifier());