Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
MailMessage Class Reference

Public Member Functions

MailMessage & setHeader (const String &name, const String &value)
 
HttpHeaders & getHeaders ()
 
MailMessage & setBody (const String &body, MimeType mime=MIME_TEXT)
 Sets the body of the email. More...
 
MailMessage & setBody (IDataSourceStream *stream, MimeType mime=MIME_TEXT)
 Sets the body of the email. More...
 
MailMessage & addAttachment (FileStream *stream)
 Adds attachment to the email. More...
 
MailMessage & addAttachment (IDataSourceStream *stream, MimeType mime, const String &filename="")
 Adds attachment to the email. More...
 
MailMessage & addAttachment (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

MailMessage& MailMessage::addAttachment ( FileStream *  stream)

Adds attachment to the email.

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

Adds attachment to the email.

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

Adds attachment to the email.

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

Sets the body of the email.

Parameters
Stringbody
MimeTypemime
MailMessage& MailMessage::setBody ( IDataSourceStream *  stream,
MimeType  mime = MIME_TEXT 
)

Sets the body of the email.

Parameters
Stream&stream
MimeTypemime