aboutsummaryrefslogtreecommitdiffstats
path: root/src/vmime/net/smtp/SMTPTransport.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vmime/net/smtp/SMTPTransport.hpp')
-rw-r--r--src/vmime/net/smtp/SMTPTransport.hpp57
1 files changed, 33 insertions, 24 deletions
diff --git a/src/vmime/net/smtp/SMTPTransport.hpp b/src/vmime/net/smtp/SMTPTransport.hpp
index a0f02418..67c63a55 100644
--- a/src/vmime/net/smtp/SMTPTransport.hpp
+++ b/src/vmime/net/smtp/SMTPTransport.hpp
@@ -1,6 +1,6 @@
//
// VMime library (http://www.vmime.org)
-// Copyright (C) 2002-2013 Vincent Richard <[email protected]>
+// Copyright (C) 2002 Vincent Richard <[email protected]>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
@@ -49,12 +49,16 @@ class SMTPCommand;
/** SMTP transport service.
*/
+class VMIME_EXPORT SMTPTransport : public transport {
-class VMIME_EXPORT SMTPTransport : public transport
-{
public:
- SMTPTransport(shared_ptr <session> sess, shared_ptr <security::authenticator> auth, const bool secured = false);
+ SMTPTransport(
+ const shared_ptr <session>& sess,
+ const shared_ptr <security::authenticator>& auth,
+ const bool secured = false
+ );
+
~SMTPTransport();
const string getProtocolName() const;
@@ -68,20 +72,22 @@ public:
void noop();
- void send
- (const mailbox& expeditor,
- const mailboxList& recipients,
- utility::inputStream& is,
- const size_t size,
- utility::progressListener* progress = NULL,
- const mailbox& sender = mailbox());
-
- void send
- (shared_ptr <vmime::message> msg,
- const mailbox& expeditor,
- const mailboxList& recipients,
- utility::progressListener* progress = NULL,
- const mailbox& sender = mailbox());
+ void send(
+ const mailbox& expeditor,
+ const mailboxList& recipients,
+ utility::inputStream& is,
+ const size_t size,
+ utility::progressListener* progress = NULL,
+ const mailbox& sender = mailbox()
+ );
+
+ void send(
+ const shared_ptr <vmime::message>& msg,
+ const mailbox& expeditor,
+ const mailboxList& recipients,
+ utility::progressListener* progress = NULL,
+ const mailbox& sender = mailbox()
+ );
bool isSecuredConnection() const;
shared_ptr <connectionInfos> getConnectionInfos() const;
@@ -91,6 +97,8 @@ public:
private:
+ static bool mailboxNeedsUTF8(const mailbox& mb);
+
/** Send the MAIL and RCPT commands to the server, checking the
* response, and using pipelining if supported by the server.
* Optionally, the DATA command can also be sent.
@@ -101,12 +109,13 @@ private:
* @param sendDATACommand if true, the DATA command will be sent
* @param size message size, in bytes (or 0, if not known)
*/
- void sendEnvelope
- (const mailbox& expeditor,
- const mailboxList& recipients,
- const mailbox& sender,
- bool sendDATACommand,
- const size_t size);
+ void sendEnvelope(
+ const mailbox& expeditor,
+ const mailboxList& recipients,
+ const mailbox& sender,
+ bool sendDATACommand,
+ const size_t size
+ );
shared_ptr <SMTPConnection> m_connection;