From 01bcc08a0bd4feca72c72912393ebbe68739f4b4 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 31 Jan 2011 15:11:10 +0000 Subject: [PATCH] Web: Smpt::New (RM #23) git-svn-id: svn://ultimatepp.org/upp/trunk@3139 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Web/smtp.cpp | 12 ++++++++++++ uppsrc/Web/smtp.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/uppsrc/Web/smtp.cpp b/uppsrc/Web/smtp.cpp index b0697ef1a..a787f8fe4 100644 --- a/uppsrc/Web/smtp.cpp +++ b/uppsrc/Web/smtp.cpp @@ -424,4 +424,16 @@ bool SmtpMail::Send() } } +SmtpMail& SmtpMail::New() +{ + to.Clear(); + to_name.Clear(); + as.Clear(); + text.Clear(); + mime.Clear(); + error.Clear(); + transcript_text.Clear(); + return *this; +} + END_UPP_NAMESPACE diff --git a/uppsrc/Web/smtp.h b/uppsrc/Web/smtp.h index b45651614..a691717c1 100644 --- a/uppsrc/Web/smtp.h +++ b/uppsrc/Web/smtp.h @@ -23,7 +23,11 @@ public: SmtpMail& Attach(const char *name, const String& data, const char *mime = 0); SmtpMail& Auth(const String& user, const String& pwd) { auth_user = user; auth_pwd = pwd; return *this; } + SmtpMail& New(); + bool Send(); + + void Reset(); String GetError() const { return error; } String GetTranscript() const { return transcript_text; }