VMime
messageBuilder Class Reference

#include <messageBuilder.hpp>

Public Member Functions

 messageBuilder ()
 ~messageBuilder ()
const mailboxgetExpeditor () const
void setExpeditor (const mailbox &expeditor)
const addressListgetRecipients () const
addressListgetRecipients ()
void setRecipients (const addressList &recipients)
const addressListgetCopyRecipients () const
addressListgetCopyRecipients ()
void setCopyRecipients (const addressList &cc)
const addressListgetBlindCopyRecipients () const
addressListgetBlindCopyRecipients ()
void setBlindCopyRecipients (const addressList &bcc)
const textgetSubject () const
void setSubject (const text &subject)
void attach (shared_ptr< attachment > attach)
void appendAttachment (shared_ptr< attachment > attach)
void removeAttachment (const size_t pos)
const shared_ptr< const attachmentgetAttachmentAt (const size_t pos) const
shared_ptr< attachmentgetAttachmentAt (const size_t pos)
size_t getAttachmentCount () const
const std::vector< shared_ptr< const attachment > > getAttachmentList () const
const std::vector< shared_ptr< attachment > > getAttachmentList ()
void constructTextPart (const mediaType &type)
shared_ptr< textPartgetTextPart ()
shared_ptr< messageconstruct () const

Detailed Description

A helper for building MIME messages.

Constructor & Destructor Documentation

◆ messageBuilder()

◆ ~messageBuilder()

Member Function Documentation

◆ appendAttachment()

void appendAttachment ( shared_ptr< attachment > attach)

Attach a new object to the message.

Parameters
attachnew attachment

References attach().

Referenced by attach().

◆ attach()

void attach ( shared_ptr< attachment > attach)

Attach a new object to the message.

Deprecated
Use messageBuilder::appendAttachment() instead.
Parameters
attachnew attachment

References appendAttachment(), and attach().

Referenced by appendAttachment(), and attach().

◆ construct()

shared_ptr< message > construct ( ) const

◆ constructTextPart()

void constructTextPart ( const mediaType & type)

Change the type of the text part and construct a new part.

Parameters
typemedia type of the text part

References textPartFactory::create(), and textPartFactory::getInstance().

Referenced by messageBuilder().

◆ getAttachmentAt() [1/2]

shared_ptr< attachment > getAttachmentAt ( const size_t pos)

Return the attachment at the specified position.

Parameters
posposition of the attachment
Returns
attachment at the specified position

◆ getAttachmentAt() [2/2]

const shared_ptr< const attachment > getAttachmentAt ( const size_t pos) const

Return the attachment at the specified position.

Parameters
posposition of the attachment
Returns
attachment at the specified position

◆ getAttachmentCount()

size_t getAttachmentCount ( ) const

Return the number of attachments in the message.

Returns
number of attachments

◆ getAttachmentList() [1/2]

const std::vector< shared_ptr< attachment > > getAttachmentList ( )

Return the list of attachments.

Returns
list of attachments

◆ getAttachmentList() [2/2]

const std::vector< shared_ptr< const attachment > > getAttachmentList ( ) const

Return the list of attachments.

Returns
list of attachments

◆ getBlindCopyRecipients() [1/2]

addressList & getBlindCopyRecipients ( )

Return the blind-copy recipients of the message (Bcc:).

Returns
blind-copy recipients of the message

◆ getBlindCopyRecipients() [2/2]

const addressList & getBlindCopyRecipients ( ) const

Return the blind-copy recipients of the message (Bcc:).

Returns
blind-copy recipients of the message

◆ getCopyRecipients() [1/2]

addressList & getCopyRecipients ( )

Return the copy recipients of the message (Cc:).

Returns
copy recipients of the message

◆ getCopyRecipients() [2/2]

const addressList & getCopyRecipients ( ) const

Return the copy recipients of the message (Cc:).

Returns
copy recipients of the message

◆ getExpeditor()

const mailbox & getExpeditor ( ) const

Return the expeditor of the message (From:).

Returns
expeditor of the message

◆ getRecipients() [1/2]

addressList & getRecipients ( )

Return the recipients of the message (To:).

return recipients of the message

◆ getRecipients() [2/2]

const addressList & getRecipients ( ) const

Return the recipients of the message (To:).

return recipients of the message

◆ getSubject()

const text & getSubject ( ) const

Return the subject of the message.

Returns
subject of the message

◆ getTextPart()

shared_ptr< textPart > getTextPart ( )

Return the text part of the message.

Returns
text part of the message

◆ removeAttachment()

void removeAttachment ( const size_t pos)

Remove the attachment at the specified position.

Parameters
posposition of the attachment to remove

◆ setBlindCopyRecipients()

void setBlindCopyRecipients ( const addressList & bcc)

Set the blind-copy recipients of the message (Bcc:).

Parameters
bcclist of blind-copy recipients

◆ setCopyRecipients()

void setCopyRecipients ( const addressList & cc)

Set the copy recipients of the message (Cc:).

Parameters
cclist of copy recipients

◆ setExpeditor()

void setExpeditor ( const mailbox & expeditor)

Set the expeditor of the message (From:).

Parameters
expeditorexpeditor of the message

◆ setRecipients()

void setRecipients ( const addressList & recipients)

Set the recipients of the message (To:).

Parameters
recipientslist of recipients

◆ setSubject()

void setSubject ( const text & subject)

Set the subject of the message.

Parameters
subjectmessage subject

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