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; }