gmime.part

Module for [Part] class

Types 3

A leaf-node MIME part object.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Part self() nothrowReturns `this`, for use in `with` statements.
PartGidBuilder builder() static nothrowGet builder for [gmime.part.Part] Returns: New builder object
gmime.part.Part newWithType(string type, string subtype) static nothrowCreates a new MIME Part with a sepcified type.
gmime.types.ContentEncoding getBestContentEncoding(gmime.types.EncodingConstraint constraint) nothrowCalculates the most efficient content encoding for the mime_part given the constraint.
gmime.data_wrapper.DataWrapper getContent() nothrowGets the internal data-wrapper of the specified mime part, or null on error. Returns: the data-wrapper for the mime part's contents.
string getContentDescription() nothrowGets the value of the Content-Description for the specified mime part if it exists or null otherwise. Returns: the content description for the specified mime part.
gmime.types.ContentEncoding getContentEncoding() nothrowGets the content encoding of the mime part. Returns: the content encoding for the specified mime part.
string getContentId() nothrowGets the content-id of the specified mime part if it exists, or null otherwise. Returns: the content id for the specified mime part.
string getContentLocation() nothrowGets the value of the Content-Location header if it exists, or null otherwise. Returns: the content location for the specified mime part.
string getContentMd5() nothrowGets the md5sum contained in the Content-Md5 header of the specified mime part if it exists, or null otherwise. Returns: the content md5 for the specified mime part.
string getFilename() nothrowGets the filename of the specificed mime part, or null if the mime_part does not have the filename or name parameter set. Returns: the filename of the specified mime_part or null if neither of the ...
gmime.types.OpenPGPData getOpenpgpData() nothrowGets whether or not (and what type) of OpenPGP data is contained within the #GMimePart. Returns: a #GMimeOpenPGPData.
bool isAttachment() nothrowDetermines whether or not the part is an attachment based on the value of the Content-Disposition header. Returns: true if the part is an attachment, otherwise false.
gmime.decrypt_result.DecryptResult openpgpDecrypt(gmime.types.DecryptFlags flags, string sessionKey = null)Decrypts the content of the mime_part and then replaces the content with the new, decrypted, content.
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.
bool openpgpSign(string userid)Signs the content of the mime_part and then replaces the content with the new, signed, content.
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.
void setContent(gmime.data_wrapper.DataWrapper content) nothrowSets the content on the mime part.
void setContentDescription(string description) nothrowSet the content description for the specified mime part.
void setContentEncoding(gmime.types.ContentEncoding encoding) nothrowSet the content encoding for the specified mime part.
void setContentId(string contentId) nothrowSet the content id for the specified mime part.
void setContentLocation(string contentLocation) nothrowSet the content location for the specified mime part.
void setContentMd5(string contentMd5) nothrowSet the content md5 for the specified mime part.
void setFilename(string filename) nothrowSets the "filename" parameter on the Content-Disposition and also sets the "name" parameter on the Content-Type.
void setOpenpgpData(gmime.types.OpenPGPData data) nothrowSets whether or not (and what type) of OpenPGP data is contained within the #GMimePart.
bool verifyContentMd5() nothrowVerify the content md5 for the specified mime part. Returns: true if the md5 is valid or false otherwise. Note: will return false if the mime part does not contain a Content-MD5.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new MIME Part object with a default content-type of application/octet-stream. Returns: an empty MIME Part object with a default content-type of application/octet-stream.

Fluent builder implementation template for gmime.part.Part

Fluent builder for gmime.part.Part

Methods
Part build() nothrowCreate object from builder. Returns: New object