TextPart

A text MIME part object.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Creates a new text MIME part object with a default content-type of text/plain.

Members

Functions

getCharset
string getCharset()

Gets the value of the charset parameter on the Content-Type header.

getText
string getText()

Gets the text content of the mime_part as a string.

self
TextPart self()

Returns this, for use in with statements.

setCharset
void setCharset(string charset)

Sets the charset parameter on the Content-Type header to the specified value.

setText
void setText(string text)

Sets the specified text as the content and updates the charset parameter on the Content-Type header.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
builder
TextPartGidBuilder builder()

Get builder for gmime.text_part.TextPart

newWithSubtype
gmime.text_part.TextPart newWithSubtype(string subtype)

Creates a new text MIME part with a sepcified subtype.

Inherited Members

From Part

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Part self()

Returns this, for use in with statements.

builder
PartGidBuilder builder()

Get builder for gmime.part.Part

newWithType
gmime.part.Part newWithType(string type, string subtype)

Creates a new MIME Part with a sepcified type.

getBestContentEncoding
gmime.types.ContentEncoding getBestContentEncoding(gmime.types.EncodingConstraint constraint)

Calculates the most efficient content encoding for the mime_part given the constraint.

getContent
gmime.data_wrapper.DataWrapper getContent()

Gets the internal data-wrapper of the specified mime part, or null on error.

getContentDescription
string getContentDescription()

Gets the value of the Content-Description for the specified mime part if it exists or null otherwise.

getContentEncoding
gmime.types.ContentEncoding getContentEncoding()

Gets the content encoding of the mime part.

getContentId
string getContentId()

Gets the content-id of the specified mime part if it exists, or null otherwise.

getContentLocation
string getContentLocation()

Gets the value of the Content-Location header if it exists, or null otherwise.

getContentMd5
string getContentMd5()

Gets the md5sum contained in the Content-Md5 header of the specified mime part if it exists, or null otherwise.

getFilename
string getFilename()

Gets the filename of the specificed mime part, or null if the mime_part does not have the filename or name parameter set.

getOpenpgpData
gmime.types.OpenPGPData getOpenpgpData()

Gets whether or not (and what type) of OpenPGP data is contained within the #GMimePart.

isAttachment
bool isAttachment()

Determines whether or not the part is an attachment based on the value of the Content-Disposition header.

openpgpDecrypt
gmime.decrypt_result.DecryptResult openpgpDecrypt(gmime.types.DecryptFlags flags, string sessionKey)

Decrypts the content of the mime_part and then replaces the content with the new, decrypted, content.

openpgpEncrypt
bool openpgpEncrypt(bool sign, string userid, gmime.types.EncryptFlags flags, string[] recipients)

Encrypts (and optionally signs) the content of the mime_part and then replaces the content with the new, encrypted, content.

openpgpSign
bool openpgpSign(string userid)

Signs the content of the mime_part and then replaces the content with the new, signed, content.

openpgpVerify
gmime.signature_list.SignatureList openpgpVerify(gmime.types.VerifyFlags flags)

Verifies the OpenPGP signature of the mime_part and then replaces the content with the original, raw, content.

setContent
void setContent(gmime.data_wrapper.DataWrapper content)

Sets the content on the mime part.

setContentDescription
void setContentDescription(string description)

Set the content description for the specified mime part.

setContentEncoding
void setContentEncoding(gmime.types.ContentEncoding encoding)

Set the content encoding for the specified mime part.

setContentId
void setContentId(string contentId)

Set the content id for the specified mime part.

setContentLocation
void setContentLocation(string contentLocation)

Set the content location for the specified mime part.

setContentMd5
void setContentMd5(string contentMd5)

Set the content md5 for the specified mime part.

setFilename
void setFilename(string filename)

Sets the "filename" parameter on the Content-Disposition and also sets the "name" parameter on the Content-Type.

setOpenpgpData
void setOpenpgpData(gmime.types.OpenPGPData data)

Sets whether or not (and what type) of OpenPGP data is contained within the #GMimePart.

verifyContentMd5
bool verifyContentMd5()

Verify the content md5 for the specified mime part.