Class Whups_Mail

Description

Whups mail processing library.

$Horde: whups/lib/Mail.php,v 1.46.2.2 2009/03/16 11:52:25 jan Exp $

Copyright 2004-2009 The Horde Project (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Located in /lib/Mail.php (line 16)


	
			
Method Summary
 Whups_Ticket processMail (string $text, array $info, [string $auth_user = null])
 string _buildComment ( &$contents, array $headers, MIME_Contents $contents)
 string _findAuthUser (array $headers)
 string _findSimpleHeaderValue (array $headers, string $name)
 integer _findTicket (array $info)
Methods
processMail (line 37)

Parse a MIME message and create a new ticket.

  • return: | PEAR_Error Ticket or Error object.
Whups_Ticket processMail (string $text, array $info, [string $auth_user = null])
  • string $text: This is the full text of the MIME message.
  • array $info: An array of information for the new ticket. This should include:
    • 'queue' => queue id
    • 'type' => type id
    • 'state' => state id
    • 'priority' => priority id
    • 'ticket' => ticket id (prevents creation of new tickets)
  • string $auth_user: This will be the Horde user that creates the ticket. If null, we will try to deduce from the message's From: header. We do NOT default to Auth::getAuth().
_buildComment (line 214)

Returns the comment text built from the message content.

  • return: The generated comment text, including basic headers and the message body.
string _buildComment ( &$contents, array $headers, MIME_Contents $contents)
  • MIME_Contents $contents: A MIME_Contents object representing the message.
  • array $headers: A hash of header values.
  • &$contents
_findAuthUser (line 260)

Searches the From: header for an email address contained in one of our users' identities.

  • return: The Horde user name that matches the headers' From: address or null if the users can't be listed or no match has been found.
string _findAuthUser (array $headers)
  • array $headers: A hash of header values.
_findSimpleHeaderValue (line 189)

Returns a header value.

If there are multiple headers of the same name, they are all returned as a comma separated list. Header values will be MIME decoded.

  • return: The value of requested header(s), or null.
string _findSimpleHeaderValue (array $headers, string $name)
  • array $headers: A hash of header values.
  • string $name: A header name.
_findTicket (line 160)

Returns the ticket number matching the provided information.

  • return: The ticket number if has been passed in the subject, false otherwise.
integer _findTicket (array $info)
  • array $info: A hash with ticket information.

Documentation generated on Sun, 30 Jan 2011 05:41:41 +0000 by phpDocumentor 1.4.3