Property | Type | Description | |
---|---|---|---|
$charset | object | ||
$data | string | A text of an email | |
$parts | array | Parts of an email | |
$resource | resource | PHP MimeParser Resource ID | |
$stream | resource | A file pointer to email |
Method | Description | |
---|---|---|
__construct ( PhpMimeMailParser\Contracts\CharsetManager $charset = null ) | Parser constructor. | |
__destruct ( ) : void | Free the held resources | |
getAddresses ( string $name ) : array | Return an array with the following keys display, address, is_group | |
getAttachments ( $include_inline = true ) : |
Returns the attachments contents in order of appearance | |
getCharset ( ) : PhpMimeMailParser\Contracts\CharsetManager | Retrieve the charset manager object | |
getData ( ) : string | Retrieve the text of an email | |
getHeader ( string $name ) : string | Retrieve a specific Email Header | |
getHeaders ( ) : array | Retrieve all mail headers | |
getHeadersRaw ( ) : string | Retrieve the raw mail headers as a string | |
getMessageBody ( string $type = 'text' ) : false | string | Returns the email message body in the specified format | |
getParts ( ) : array | Retrieve the parts of an email | |
getRawHeader ( string $name ) : string | Retrieve a specific Email Header, without charset conversion. | |
getResource ( ) : resource | Retrieve the resource | |
getStream ( ) : resource | Retrieve the file pointer to email | |
saveAttachments ( string $attach_dir, $include_inline = true ) : array | Save attachments in a folder | |
setPath ( string $path ) : |
Set the file path we use to get the email text | |
setStream ( resource $stream ) : |
Set the Stream resource we use to get the email text | |
setText ( string $data ) : |
Set the email text |
Method | Description | |
---|---|---|
decodeContentTransfer ( string $encodedString, string $encodingType ) : string | Decode the string from Content-Transfer-Encoding | |
decodeHeader ( string | array $input ) : string | $input can be a string or array | |
decodeSingleHeader ( string $input ) : string | Decodes a single header (= string) | |
getAttachmentStream ( array &$part ) : resource | Read the attachment Body and save temporary file resource | |
getEmbeddedData ( string $contentId ) : string | Returns the embedded data structure | |
getPart ( string $type, array $parts ) : string | array | Retrieve a specified MIME part | |
getPartBody ( array &$part ) : string | Retrieve the Body of a MIME part | |
getPartBodyFromFile ( array &$part ) : string | Retrieve the Body from a MIME part from file | |
getPartBodyFromText ( array &$part ) : string | Retrieve the Body from a MIME part from text | |
getPartCharset ( array $part ) : string | false | Return the charset of the MIME part | |
getPartComplete ( array &$part ) : string | Retrieve the content of a MIME part | |
getPartFromFile ( array &$part ) : string | Retrieve the content from a MIME part from file | |
getPartFromText ( array &$part ) : string | Retrieve the content from a MIME part from text | |
getPartHeader ( &$part ) : String | Retrieve the raw Header of a MIME part | |
getPartHeaderFromFile ( &$part ) : String | Retrieve the Header from a MIME part from file | |
getPartHeaderFromText ( &$part ) : String | Retrieve the Header from a MIME part from text | |
parse ( ) : void | Parse the Message into parts |
public __construct ( PhpMimeMailParser\Contracts\CharsetManager $charset = null ) | ||
$charset | PhpMimeMailParser\Contracts\CharsetManager |
protected decodeSingleHeader ( string $input ) : string | ||
$input | string | |
return | string |
public getAddresses ( string $name ) : array | ||
$name | string | Header name (case-insensitive) |
return | array |
protected getAttachmentStream ( array &$part ) : resource | ||
$part | array | |
return | resource | Mime Body Part |
public getAttachments ( $include_inline = true ) : |
||
return |
public getCharset ( ) : PhpMimeMailParser\Contracts\CharsetManager | ||
return | PhpMimeMailParser\Contracts\CharsetManager | charset |
protected getEmbeddedData ( string $contentId ) : string | ||
$contentId | string | Content-Id |
return | string |
public getHeadersRaw ( ) : string | ||
return | string |
public getMessageBody ( string $type = 'text' ) : false | string | ||
$type | string | text, html or htmlEmbedded |
return | false | string | Body or False if not found |
protected getPartBody ( array &$part ) : string | ||
$part | array | |
return | string |
protected getPartBodyFromFile ( array &$part ) : string | ||
$part | array | |
return | string | Mime Body Part |
protected getPartBodyFromText ( array &$part ) : string | ||
$part | array | |
return | string | Mime Body Part |
protected getPartCharset ( array $part ) : string | false | ||
$part | array | |
return | string | false |
protected getPartComplete ( array &$part ) : string | ||
$part | array | |
return | string |
protected getPartFromFile ( array &$part ) : string | ||
$part | array | |
return | string | Mime Content |
protected getPartFromText ( array &$part ) : string | ||
$part | array | |
return | string | Mime Content |
protected getPartHeader ( &$part ) : String | ||
$part | Object | |
return | String |
protected getPartHeaderFromFile ( &$part ) : String | ||
$part | Array | |
return | String | Mime Header Part |
protected getPartHeaderFromText ( &$part ) : String | ||
$part | Array | |
return | String | Mime Header Part |
public getRawHeader ( string $name ) : string | ||
$name | string | Header name (case-insensitive) |
return | string |
public getResource ( ) : resource | ||
return | resource | resource |
public getStream ( ) : resource | ||
return | resource | stream |
public saveAttachments ( string $attach_dir, $include_inline = true ) : array | ||
$attach_dir | string | directory |
return | array | Saved attachments paths |
public setStream ( resource $stream ) : |
||
$stream | resource | |
return | MimeMailParser Instance |
protected resource $resource | ||
return | resource |