gmime.part
Module for [Part] class
Types 3
classPart : gmime.object.ObjectWrap
A leaf-node MIME part object.
Methods
PartGidBuilder builder()Get builder for [gmime.part.Part] Returns: New builder objectgmime.part.Part newWithType(string type, string subtype)Creates a new MIME Part with a sepcified type.gmime.types.ContentEncoding getBestContentEncoding(gmime.types.EncodingConstraint constraint)Calculates the most efficient content encoding for the mime_part given the constraint.gmime.data_wrapper.DataWrapper getContent()Gets 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()Gets 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()Gets the content encoding of the mime part. Returns: the content encoding for the specified mime part.string getContentId()Gets 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()Gets the value of the Content-Location header if it exists, or null otherwise. Returns: the content location for the specified mime part.string getContentMd5()Gets 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()Gets the filename of the specificed mime part, or null if the mimepart does not have the filename or name parameter set. Returns: the filename of the specified mimepart or null if neither of the pa...gmime.types.OpenPGPData getOpenpgpData()Gets whether or not (and what type) of OpenPGP data is contained within the #GMimePart. Returns: a #GMimeOpenPGPData.bool isAttachment()Determines 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)Sets the content on the mime part.void setContentDescription(string description)Set the content description for the specified mime part.void setContentEncoding(gmime.types.ContentEncoding encoding)Set the content encoding for the specified mime part.void setContentId(string contentId)Set the content id for the specified mime part.void setContentLocation(string contentLocation)Set the content location for the specified mime part.void setContentMd5(string contentMd5)Set the content md5 for the specified mime part.void setFilename(string filename)Sets the "filename" parameter on the Content-Disposition and also sets the "name" parameter on the Content-Type.void setOpenpgpData(gmime.types.OpenPGPData data)Sets whether or not (and what type) of OpenPGP data is contained within the #GMimePart.bool verifyContentMd5()Verify 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.