Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

EmailArchivingUtil Class Reference

Static Public Member Functions

static resolveOwnerOfEmailMessage (ImapMessage $emailMessage)
static resolveEmailSenderFromEmailMessage (ImapMessage $emailMessage)
static resolveEmailRecipientsFromEmailMessage (ImapMessage $emailMessage)
static isMessageForwarded (ImapMessage $emailMessage)
static resolveEmailSenderFromForwardedEmailMessage (ImapMessage $emailMessage)
static getPersonsAndAccountsByEmailAddressForUser ($emailAddress, User $user)
static getPersonsAndAccountsByEmailAddress ($emailAddress, $userCanAccessContacts=false, $userCanAccessLeads=false, $userCanAccessAccounts=false)
static resolvePersonOrAccountByEmailAddress ($emailAddress, $userCanAccessContacts=false, $userCanAccessLeads=false, $userCanAccessAccounts=false)
static resolveSanitizeFromImapToUtf8 (EmailMessage $message)

Detailed Description

Helper class to work with inbound emails

Definition at line 40 of file EmailArchivingUtil.php.


Member Function Documentation

static resolveOwnerOfEmailMessage ( ImapMessage emailMessage  )  [static]

For a given email find user. Function consider that user sent email to dropbox (To, CC or BCC), or forwarded email to dropbox, via his email client.

Parameters:
ImapMessage $emailMessage
Returns:
User $user

Definition at line 49 of file EmailArchivingUtil.php.

static resolveEmailSenderFromEmailMessage ( ImapMessage emailMessage  )  [static]

Get information from email message, for example sender, recipient, subject... It is quite different for forwarded messages, because we need to parse email body to get those information.

Parameters:
ImapMessage $emailMessage
string $fromAddress

Definition at line 90 of file EmailArchivingUtil.php.

static resolveEmailRecipientsFromEmailMessage ( ImapMessage emailMessage  )  [static]

Get recipient details from email message. Have to cover two cases: when message is CC-ed or BCC-ed to dropbox, and when email message is forwarded to dropbox. 1. If message is CC-ed or BCC-ed to dropbox, recipients can be exctracted from "To" field of email message 2. If message is forwarded, then email from which message is forwarded to dropbox is recipient

Parameters:
ImapMessage $emailMessage
array $emailRecipient

Definition at line 125 of file EmailArchivingUtil.php.

static isMessageForwarded ( ImapMessage emailMessage  )  [static]

Check if email message is forwarded or not, based on email subject. For works only with few emails clients: Gmail, Outlook, ThunderBird, Yahoo

Parameters:
ImapMessage $emailMessage
Returns:
boolean $isForwrded

Definition at line 190 of file EmailArchivingUtil.php.

static resolveEmailSenderFromForwardedEmailMessage ( ImapMessage emailMessage  )  [static]

Parse email to get original sender(in case of forwarded messages) For now we extract only from email and name

Parameters:
ImapMessage $emailMessage
Returns:
array $emailInfo

Definition at line 211 of file EmailArchivingUtil.php.

static getPersonsAndAccountsByEmailAddressForUser ( emailAddress,
User user 
) [static]

Given an email address and user, get the objects that match the email address filtered by the rights security for the provided user.

Parameters:
string $emailAddress
User $user
Returns:
array of objects which are either persons and/or accounts

Definition at line 241 of file EmailArchivingUtil.php.

static getPersonsAndAccountsByEmailAddress ( emailAddress,
userCanAccessContacts = false,
userCanAccessLeads = false,
userCanAccessAccounts = false 
) [static]

Get all

Parameters:
string $emailAddress
boolean $userCanAccessContacts
boolean $userCanAccessLeads
boolean $userCanAccessAccounts
Returns:
Contact || Account || User || NULL || array of objects

Definition at line 261 of file EmailArchivingUtil.php.

static resolvePersonOrAccountByEmailAddress ( emailAddress,
userCanAccessContacts = false,
userCanAccessLeads = false,
userCanAccessAccounts = false 
) [static]

Get Contact or Account or User, based on email address

Parameters:
string $emailAddress
boolean $userCanAccessContacts
boolean $userCanAccessLeads
boolean $userCanAccessAccounts
Returns:
Contact || Account || User || NULL

Definition at line 298 of file EmailArchivingUtil.php.

static resolveSanitizeFromImapToUtf8 ( EmailMessage message  )  [static]

Convert $message->subject from any mime encoded to UTF8

Parameters:
EmailMessage $message

Definition at line 351 of file EmailArchivingUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Jan 18 07:10:24 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8