diff options
-rw-r--r-- | project2/sendmailTask.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/project2/sendmailTask.cpp b/project2/sendmailTask.cpp index 7987d72..7e0f25f 100644 --- a/project2/sendmailTask.cpp +++ b/project2/sendmailTask.cpp @@ -69,6 +69,9 @@ class Header : public SendMailTask::MailPart { Header(const std::string & h, const VariableType & v) : header(h), value(v) { } + Header(const std::string & h, const char * v) : + header(h), value(v) { + } const char * write(char ** buf, int * len) { LexicalCall<const char *, void>(boost::bind(&Header::writeText, this, buf, len, _1), value); return (const char *)*buf; @@ -78,7 +81,7 @@ class Header : public SendMailTask::MailPart { *len = asprintf(buf, "%s: %s\r\n", header.c_str(), text); } const std::string header; - const VariableType & value; + const VariableType value; }; class HtmlContent : public SendMailTask::MailPart { public: |