#pragma once #include "../Streams/Stream.hpp" namespace Tesses::Framework::Mail { class SMTPBody { public: std::string mimeType; virtual void Write(std::shared_ptr strm)=0; virtual ~SMTPBody(); }; class SMTPStringBody : public SMTPBody { public: SMTPStringBody(); SMTPStringBody(std::string text, std::string mimeType); std::string text; void Write(std::shared_ptr strm); }; class SMTPStreamBody : public SMTPBody { std::shared_ptr stream; public: SMTPStreamBody(std::string mimeType,std::shared_ptr stream); void Write(std::shared_ptr strm); ~SMTPStreamBody(); }; class SMTPClient { std::shared_ptr strm; public: SMTPClient(std::shared_ptr strm); std::string domain; std::string username; std::string password; std::string from; std::string from_name; std::string to; std::string subject; std::shared_ptr body; std::vector>> attachments; void Send(); ~SMTPClient(); }; }