VMime
messageBuilder Class Reference

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
attachment
getAttachmentAt (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

Member Function Documentation

void appendAttachment ( shared_ptr< attachment attach)

Attach a new object to the message.

Parameters
attachnew attachment

Referenced by messageBuilder::attach().

void attach ( shared_ptr< attachment attach)

Attach a new object to the message.

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

References messageBuilder::appendAttachment().

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::messageBuilder().

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
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
size_t getAttachmentCount ( ) const

Return the number of attachments in the message.

Returns
number of attachments
const std::vector< shared_ptr< const attachment > > getAttachmentList ( ) const

Return the list of attachments.

Returns
list of attachments
const std::vector< shared_ptr< attachment > > getAttachmentList ( )

Return the list of attachments.

Returns
list of attachments
const addressList & getBlindCopyRecipients ( ) const

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

Returns
blind-copy recipients of the message
addressList & getBlindCopyRecipients ( )

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

Returns
blind-copy recipients of the message
const addressList & getCopyRecipients ( ) const

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

Returns
copy recipients of the message
addressList & getCopyRecipients ( )

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

Returns
copy recipients of the message
const mailbox & getExpeditor ( ) const

Return the expeditor of the message (From:).

Returns
expeditor of the message
const addressList & getRecipients ( ) const

Return the recipients of the message (To:).

return recipients of the message

addressList & getRecipients ( )

Return the recipients of the message (To:).

return recipients of the message

const text & getSubject ( ) const

Return the subject of the message.

Returns
subject of the message
shared_ptr< textPart > getTextPart ( )

Return the text part of the message.

Returns
text part of the message
void removeAttachment ( const size_t  pos)

Remove the attachment at the specified position.

Parameters
posposition of the attachment to remove
void setBlindCopyRecipients ( const addressList bcc)

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

Parameters
bcclist of blind-copy recipients
void setCopyRecipients ( const addressList cc)

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

Parameters
cclist of copy recipients
void setExpeditor ( const mailbox expeditor)

Set the expeditor of the message (From:).

Parameters
expeditorexpeditor of the message
void setRecipients ( const addressList recipients)

Set the recipients of the message (To:).

Parameters
recipientslist of recipients
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: