aboutsummaryrefslogtreecommitdiff
path: root/butl/sendmail.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:08:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-01 16:59:24 +0300
commit61377c582e0f2675baa5f5e6e30a35d1a4164b33 (patch)
tree11cdca992834d7f7f197f72856712fbcb3020e3d /butl/sendmail.cxx
parent442c1a6790e52baa0c081f310d4d9e9b6f1ff638 (diff)
Add hxx extension for headers and lib prefix for library dir
Diffstat (limited to 'butl/sendmail.cxx')
-rw-r--r--butl/sendmail.cxx40
1 files changed, 0 insertions, 40 deletions
diff --git a/butl/sendmail.cxx b/butl/sendmail.cxx
deleted file mode 100644
index 103bab5..0000000
--- a/butl/sendmail.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-// file : butl/sendmail.cxx -*- C++ -*-
-// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#include <butl/sendmail>
-
-using namespace std;
-
-namespace butl
-{
- void sendmail::
- headers (const std::string& from,
- const std::string& subj,
- const recipients_type& to,
- const recipients_type& cc,
- const recipients_type& bcc)
- {
- if (!from.empty ())
- out << "From: " << from << endl;
-
- auto rcp =[this] (const char* h, const recipients_type& rs)
- {
- if (!rs.empty ())
- {
- bool f (true);
- out << h << ": ";
- for (const string& r: rs)
- out << (f ? (f = false, "") : ", ") << r;
- out << endl;
- }
- };
-
- rcp ("To", to);
- rcp ("Cc", cc);
- rcp ("Bcc", bcc);
-
- out << "Subject: " << subj << endl
- << endl; // Header/body separator.
- }
-}