#include <MailMessage.h>

Collaboration diagram for MailMessage:
[legend]

Public Member Functions

MailMessagesetHeader (const String &name, const String &value)
 Set a header value. More...
 
HttpHeadersgetHeaders ()
 Get a reference to the current set of headers. More...
 
MailMessagesetBody (const String &body, MimeType mime=MIME_TEXT)
 Sets the body of the email. More...
 
MailMessagesetBody (String &&body, MimeType mime=MIME_TEXT) noexcept
 Sets the body of the email using move semantics. More...
 
MailMessagesetBody (IDataSourceStream *stream, MimeType mime=MIME_TEXT)
 Sets the body of the email. More...
 
MailMessageaddAttachment (FileStream *stream)
 Adds attachment to the email. More...
 
MailMessageaddAttachment (IDataSourceStream *stream, MimeType mime, const String &filename="")
 Adds attachment to the email. More...
 
MailMessageaddAttachment (IDataSourceStream *stream, const String &mime, const String &filename="")
 Adds attachment to the email. More...
 

Public Attributes

String to
 
String from
 
String subject
 
String cc
 

Friends

class SmtpClient
 

Member Function Documentation

◆ addAttachment() [1/3]

MailMessage& MailMessage::addAttachment ( FileStream stream)

Adds attachment to the email.

Parameters
stream
Return values
MailMessage&

◆ addAttachment() [2/3]

MailMessage& MailMessage::addAttachment ( IDataSourceStream stream,
MimeType  mime,
const String filename = "" 
)

Adds attachment to the email.

Parameters
stream
mime
filename
Return values
MailMessage&

◆ addAttachment() [3/3]

MailMessage& MailMessage::addAttachment ( IDataSourceStream stream,
const String mime,
const String filename = "" 
)

Adds attachment to the email.

Parameters
stream
mime
filename
Return values
MailMessage&

◆ getHeaders()

HttpHeaders& MailMessage::getHeaders ( )

Get a reference to the current set of headers.

Return values
HttpHeaders&

◆ setBody() [1/3]

MailMessage& MailMessage::setBody ( const String body,
MimeType  mime = MIME_TEXT 
)

Sets the body of the email.

Parameters
body
mime
Return values
MailMessage&

◆ setBody() [2/3]

MailMessage& MailMessage::setBody ( String &&  body,
MimeType  mime = MIME_TEXT 
)
noexcept

Sets the body of the email using move semantics.

Parameters
bodyWill be moved into message then invalidated
mime
Return values
MailMessage&

◆ setBody() [3/3]

MailMessage& MailMessage::setBody ( IDataSourceStream stream,
MimeType  mime = MIME_TEXT 
)

Sets the body of the email.

Parameters
stream
mime
Return values
MailMessage&

◆ setHeader()

MailMessage& MailMessage::setHeader ( const String name,
const String value 
)
inline

Set a header value.

Parameters
name
value
Return values
MailMessage&

Friends And Related Function Documentation

◆ SmtpClient

friend class SmtpClient
friend

Member Data Documentation

◆ cc

String MailMessage::cc

◆ from

String MailMessage::from

◆ subject

String MailMessage::subject

◆ to

String MailMessage::to

The documentation for this class was generated from the following file: