Provides various routines to manipulate and create multipart messages from an existing message (e.g. to make space for attachments in a message, or to change a simple message to a multipart/alternative one, etc...)
- author Zaahid Bateson
Methods |
public __construct(ZBateson |
public createAlternativeContentPart(ZBateson Creates a new mime part as a multipart/alternative and assigns the passed $contentPart as a part below it before returning it.
|
public createAndAddPartForAttachment(ZBateson Creates and adds a IMimePart for the passed content and options as an attachment.
|
public createContentPartForMimeType(ZBateson Creates a new content part for the passed mimeType and charset, making space by creating a multipart/alternative if needed |
public createMultipartRelatedPartForInlineChildrenOf(ZBateson Creates a multipart/related part out of 'inline' children of $parent and returns it. |
public enforceMime(ZBateson Enforces the message to be a mime message for a non-mime (e.g. uuencoded or unspecified) message. If the message has uuencoded attachments, sets up the message as a multipart/mixed message and creates a separate content part. |
public findOtherContentPartFor(ZBateson Finds an alternative inline part in the message and returns it if one exists. If the passed $mimeType is text/plain, searches for a text/html part. Otherwise searches for a text/plain part to return.
|
public getContentPartContainerFromAlternative( $mimeType, ZBateson Searches the passed $alternativePart for a part with the passed mime type and returns its parent. Used for alternative mime types that have a multipart/mixed or multipart/related child containing a content part of $mimeType, where the whole mixed/related part should be removed.
|
public getUniqueBoundary(string $mimeType) : string Creates and returns a unique boundary.
|
public moveAllNonMultiPartsToMessageExcept(ZBateson Moves all parts under $from into this message except those with a content-type equal to $exceptMimeType. If the message is not a multipart/mixed message, it is set to multipart/mixed first. |
public removeAllContentPartsByMimeType(ZBateson Removes the content part of the message with the passed mime type. If there is a remaining content part and it is an alternative part of the main message, the content part is moved to the message part. If the content part is part of an alternative part beneath the message, the alternative part is replaced by the remaining content part, optionally keeping other parts if $keepOtherContent is set to true.
|
public removeAllContentPartsFromAlternative(ZBateson Removes all parts of $mimeType from $alternativePart. If $alternativePart contains a multipart/mixed or multipart/relative part with other parts of different content-types, the multipart part is removed, and parts of different content-types can optionally be moved to the main message part. |
public removePartByMimeType(ZBateson Removes the 'inline' part with the passed contentType, at the given index defaulting to the first
|
public setContentPartForMimeType(ZBateson Either creates a mime part or sets the existing mime part with the passed mimeType to $strongOrHandle.
|
public setMessageAsAlternative(ZBateson Sets the passed message as multipart/alternative. If the message has content, a new part is created and added as a child of the message. The message's content and content headers are moved to the new part. |
public setMessageAsMixed(ZBateson Sets the passed message as multipart/mixed. If the message has content, a new part is created and added as a child of the message. The message's content and content headers are moved to the new part. |
public setMimeHeaderBoundaryOnPart(ZBateson Creates a unique mime boundary and assigns it to the passed part's Content-Type header with the passed mime type. |
Properties |
Properties |
private ZBateson
|