25#ifndef JOIN_SERVICES_SMTP_MESSAGE_HPP
26#define JOIN_SERVICES_SMTP_MESSAGE_HPP
29#include <join/version.hpp>
97 void address (
const std::string& addr);
103 const std::string&
address ()
const;
109 void realName (
const std::string& name);
115 const std::string&
realName ()
const;
302 void subject (
const std::string& subj);
308 const std::string&
subject ()
const;
314 void content (
const std::string& message);
320 const std::string&
content ()
const;
mail message.
Definition smtp_message.hpp:230
int writeContent(std::ostream &out) const
write content to the given output stream.
Definition smtp_message.cpp:449
std::string _subject
mail sender.
Definition smtp_message.hpp:344
virtual ~SmtpMessage()=default
destroy the SmtpMessage instance.
void addRecipient(const SmtpRecipient &to)
add mail recipient.
Definition smtp_message.cpp:305
const std::string & subject() const
get mail subject.
Definition smtp_message.cpp:341
const SmtpRecipients & recipients() const
get mail recipients.
Definition smtp_message.cpp:323
SmtpSender _sender
mail sender.
Definition smtp_message.hpp:338
SmtpRecipients _recipients
mail recipients.
Definition smtp_message.hpp:341
int writeHeaders(std::ostream &out) const
write header to the given output stream.
Definition smtp_message.cpp:368
SmtpMessage()=default
create the SmtpMessage instance.
SmtpMessage & operator=(const SmtpMessage &other)
assign the SmtpMessage instance by copy.
Definition smtp_message.cpp:249
std::string _content
mail content.
Definition smtp_message.hpp:347
const SmtpSender & sender() const
get mail sender
Definition smtp_message.cpp:296
const std::string & content() const
get mail content.
Definition smtp_message.cpp:359
mail recipient.
Definition smtp_message.hpp:143
Type
recipient type.
Definition smtp_message.hpp:149
@ CCRecipient
Definition smtp_message.hpp:151
@ Recipient
Definition smtp_message.hpp:150
@ BCCRecipient
Definition smtp_message.hpp:152
SmtpRecipient & operator=(const SmtpRecipient &other)
assign the SmtpRecipient instance by copy.
Definition smtp_message.cpp:187
Type _type
recipient type.
Definition smtp_message.hpp:220
virtual ~SmtpRecipient()=default
destroy the SmtpRecipient instance.
SmtpRecipient()=default
create the SmtpRecipient instance.
Type type() const
get recipient type.
Definition smtp_message.cpp:228
mail sender.
Definition smtp_message.hpp:42
SmtpSender()=default
create the SmtpSender instance.
virtual ~SmtpSender()=default
destroy the SmtpSender instance.
SmtpSender & operator=(const SmtpSender &other)
assign the SmtpSender instance by copy.
Definition smtp_message.cpp:71
const std::string & realName() const
get real name.
Definition smtp_message.cpp:130
std::string _name
name.
Definition smtp_message.hpp:128
const std::string & address() const
get address.
Definition smtp_message.cpp:112
std::string _address
address.
Definition smtp_message.hpp:125
bool empty() const
check if empty.
Definition smtp_message.cpp:139
Definition acceptor.hpp:32
std::vector< SmtpRecipient > SmtpRecipients
mail recipient list.
Definition smtp_message.hpp:224
std::ostream & operator<<(std::ostream &os, const BasicLinkLayerEndpoint< Protocol > &endpoint)
push endpoint representation into a stream.
Definition endpoint.hpp:258