\Whups_Mail

Whups mail processing library.

Copyright 2004-2017 Horde LLC (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.

Summary

Methods
Properties
Constants
processMail()
No public properties found
No constants found
_findTicket()
_findAuthUser()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

processMail()

processMail(string  $text, array  $info, string  $auth_user = null) : \Whups_Ticket

Parse a MIME message and create a new ticket.

Parameters

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 $GLOBALS['registry']->getAuth().

Returns

\Whups_Ticket

Ticket.

_findTicket()

_findTicket(array  $info) : integer

Returns the ticket number matching the provided information.

Parameters

array $info

A hash with ticket information.

Returns

integer —

The ticket number if has been passed in the subject, false otherwise.

_findAuthUser()

_findAuthUser(string  $from) : string

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

Parameters

string $from

The From address.

Returns

string —

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.