Overview

Packages

  • Jyxo_Beholder
  • Jyxo_Charset
  • Jyxo_Color
  • Jyxo_Css
  • Jyxo_ErrorHandling
  • Jyxo_FirePhp
  • Jyxo_Gettext
    • Parser
  • Jyxo_Html
  • Jyxo_Input
    • Chain
    • Filter
    • Validator
  • Jyxo_Mail
    • Email
    • Parser
    • Sender
  • Jyxo_Rpc
    • Json
    • Xml
  • Jyxo_Shell
  • Jyxo_SpamFilter
  • Jyxo_Spl
  • Jyxo_String
  • Jyxo_Svn
  • Jyxo_Time
  • Jyxo_Timer
  • Jyxo_Webdav
  • Jyxo_XmlReader
  • PHP

Classes

  • Jyxo_Mail_Parser

Exceptions

  • Jyxo_Mail_Parser_DefaultPartIdNotExistException
  • Jyxo_Mail_Parser_EmailNotExistException
  • Jyxo_Mail_Parser_Exception
  • Jyxo_Mail_Parser_PartNotExistException
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Jyxo_Mail_Parser

Mail parsing class. Based on Mail_IMAPv2 class (c) Copyright 2004-2005 Richard York

Category: Jyxo
Package: Jyxo_Mail
Subpackage: Parser
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Mail/Parser.php
Methods summary
public
# __construct( resource $connection, integer $uid )

Creates an instance.

Creates an instance.

Parameters

$connection
resource
IMAP folder connection.
$uid
integer
Message Id
public array
# getHeaders( string $pid = null )

Returns headers.

Returns headers.

Parameters

$pid
string
Part Id

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
public
# parseBody( string $pid = null, string $mimeType = 'text/html', boolean $alternative = true, boolean $all = false )

Parses message body.

Parses message body.

Parameters

$pid
string
Part Id
$mimeType
string
Default mime-type
$alternative
boolean
Should the alternative part be used as well
$all
boolean
Should all parts get parsed

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
public array
# getAttachments( )

Returns a list of attachments.

Returns a list of attachments.

Returns

array
public array
# getInlines( )

Returns a list of part Ids of inline parts.

Returns a list of part Ids of inline parts.

Returns

array
public array
# getRelatedParts( string $pid, array $types, boolean $all = false )

Returns related parts.

Returns related parts.

Parameters

$pid
string
Part Id
$types
array
List of types to search for
$all
boolean
Return all types

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
public array
# getAllRelatedParts( string $pid )

Returns all related parts.

Returns all related parts.

Parameters

$pid
string
Part Id

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
public array
# getBody( string $pid = '1', integer $mode = Jyxo_Mail_Parser::BODY, string $mimeType = 'text/html', integer $attempt = 1 )

Returns body of the given part.

Returns body of the given part.

Parameters

$pid
string
Part Id
$mode
integer
Body return mode
$mimeType
string
Requested mime-type
$attempt
integer
Number of retries

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
Jyxo_Mail_Parser_PartNotExistException
If no such part exists
public static string
# decodeBody( string $body, string $encoding )

Decodes body.

Decodes body.

Parameters

$body
string
Body
$encoding
string
Body encoding

Returns

string
public array
# getMime( array $types )

Returns a list of part Ids of given types.

Returns a list of part Ids of given types.

Parameters

$types
array
Part types

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
public array
# getMimeExcept( array $exceptTypes )

Returns a list of part Ids of all parts except for the given types.

Returns a list of part Ids of all parts except for the given types.

Parameters

$exceptTypes
array
Ignored part types

Returns

array

Throws

Jyxo_Mail_Parser_EmailNotExistException
If no such email exists
Constants summary
integer BODY 0
#

Retrieve message body. Search for possible alternatives.

Retrieve message body. Search for possible alternatives.

See

Jyxo_Mail_Parser::getBody()
integer BODY_INFO 1
#

Retrieve body info.

Retrieve body info.

See

Jyxo_Mail_Parser::getBody()
integer BODY_LITERAL 2
#

Retrieve raw message body.

Retrieve raw message body.

See

Jyxo_Mail_Parser::getBody()
integer BODY_LITERAL_DECODE 3
#

Retrieve decoded message body.

Retrieve decoded message body.

See

Jyxo_Mail_Parser::getBody()
Jyxo PHP Library API documentation generated by ApiGen 2.3.0