Documentation

OSSMail_Mail_Model extends Base
in package

Mail Scanner bind email action.

Table of Contents

IGNORED_MAILS  = ['@', 'undisclosed-recipients', 'Undisclosed-recipients', 'undisclosed-recipients@', 'Undisclosed-recipients@', 'Undisclosed recipients@,@', 'undisclosed recipients@,@']
$actionResult  : array<string|int, mixed>
$mailAccount  : array<string|int, mixed>
$mailCrmId  : bool|int
$mailFolder  : string
$mailType  : int
$value  : array<string|int, mixed>
__construct()  : mixed
Constructor.
addActionResult()  : mixed
Add action result.
findEmailAddress()  : array<string|int, mixed>|string
Find email address.
findEmailUser()  : bool
Find email user.
get()  : mixed
Function to get the value for a given key.
getAccount()  : array<string|int, mixed>
Get account.
getAccountOwner()  : int
Get account owner.
getActionResult()  : array<string|int, mixed>
Get action result.
getArray()  : array<string|int, mixed>
Function to get the array values for a given key.
getContent()  : string
Treatment mail content with all images and unnecessary trash.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
getEmail()  : string
Get email.
getFolder()  : string
Get folder.
getForHtml()  : mixed
Function to get the html encoded value for a given key.
getForSql()  : mixed
Function to get the value if its safe to use for SQL Query (column).
getKeys()  : array<string|int, string>
Function to get keys.
getMailCrmId()  : bool|int
Get mail crm id.
getTypeEmail()  : int|string
Get type email.
getUniqueId()  : string
Generation crm unique id.
has()  : bool
Function to check if the key exists.
isEmpty()  : bool
Function to check if the key is empty.
postProcess()  : mixed
Post process function.
remove()  : mixed
Function to remove the value.
saveAttachments()  : mixed
Function to saving attachments.
searchByDomains()  : array<string|int, int>
Search crmids from domains.
searchByEmails()  : array<string|int, mixed>
Search crmids by emails.
set()  : $this
Function to set the value for a given key.
setAccount()  : mixed
Set account.
setData()  : $this
Function to set all the values.
setFolder()  : mixed
Set folder.
setMailCrmId()  : mixed
Set mail crm id.
getFileFromImage()  : array<string|int, mixed>
Get file from image.

Constants

IGNORED_MAILS

public array<string|int, string> IGNORED_MAILS = ['@', 'undisclosed-recipients', 'Undisclosed-recipients', 'undisclosed-recipients@', 'Undisclosed-recipients@', 'Undisclosed recipients@,@', 'undisclosed recipients@,@']

Ignored mail addresses

Properties

$actionResult

protected array<string|int, mixed> $actionResult = []

Action result.

$mailAccount

protected array<string|int, mixed> $mailAccount = []

Mail account.

$mailCrmId

protected bool|int $mailCrmId = \false

Mail crm id.

$mailFolder

protected string $mailFolder = ''

Mail folder.

$mailType

protected int $mailType

Mail type.

$value

protected array<string|int, mixed> $value

Values

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
$values : array<string|int, mixed> = []
Return values
mixed

addActionResult()

Add action result.

public addActionResult(string $type, string $result) : mixed
Parameters
$type : string
$result : string
Return values
mixed

findEmailAddress()

Find email address.

public findEmailAddress(string $field[, string $searchModule = false ][, bool $returnArray = true ]) : array<string|int, mixed>|string
Parameters
$field : string
$searchModule : string = false
$returnArray : bool = true
Return values
array<string|int, mixed>|string

findEmailUser()

Find email user.

public static findEmailUser(string $emails) : bool
Parameters
$emails : string
Return values
bool

get()

Function to get the value for a given key.

public get(string $key) : mixed
Parameters
$key : string
Return values
mixed

Value for the given key

getAccount()

Get account.

public getAccount() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAccountOwner()

Get account owner.

public getAccountOwner() : int
Return values
int

getActionResult()

Get action result.

public getActionResult([string $action = false ]) : array<string|int, mixed>
Parameters
$action : string = false
Return values
array<string|int, mixed>

getArray()

Function to get the array values for a given key.

public getArray(string $key[, array<string|int, mixed> $value = [] ]) : array<string|int, mixed>
Parameters
$key : string
$value : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getContent()

Treatment mail content with all images and unnecessary trash.

public getContent() : string
Return values
string

getData()

Function to get all the values of the Object.

public getData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEmail()

Get email.

public getEmail(string $cacheKey) : string
Parameters
$cacheKey : string
Return values
string

getFolder()

Get folder.

public getFolder() : string
Return values
string

getForHtml()

Function to get the html encoded value for a given key.

public getForHtml(string $key) : mixed
Parameters
$key : string
Return values
mixed

getForSql()

Function to get the value if its safe to use for SQL Query (column).

public getForSql(string $key[, bool $skipEmtpy = true ]) : mixed
Parameters
$key : string
$skipEmtpy : bool = true

Skip the check if string is empty

Return values
mixed

Value for the given key

getKeys()

Function to get keys.

public getKeys() : array<string|int, string>
Return values
array<string|int, string>

getMailCrmId()

Get mail crm id.

public getMailCrmId() : bool|int
Return values
bool|int

getTypeEmail()

Get type email.

public getTypeEmail([bool $returnText = false ]) : int|string
Parameters
$returnText : bool = false
Return values
int|string

getUniqueId()

Generation crm unique id.

public getUniqueId() : string
Return values
string

has()

Function to check if the key exists.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

isEmpty()

Function to check if the key is empty.

public isEmpty(string $key) : bool
Parameters
$key : string
Return values
bool

postProcess()

Post process function.

public postProcess() : mixed
Return values
mixed

remove()

Function to remove the value.

public remove(string $key) : mixed
Parameters
$key : string
Return values
mixed

saveAttachments()

Function to saving attachments.

public saveAttachments() : mixed
Return values
mixed

searchByDomains()

Search crmids from domains.

public searchByDomains(string $moduleName, string $fieldName, array<string|int, string> $emails) : array<string|int, int>
Parameters
$moduleName : string
$fieldName : string
$emails : array<string|int, string>
Return values
array<string|int, int>

CRM ids

searchByEmails()

Search crmids by emails.

public searchByEmails(string $moduleName, string $fieldName, array<string|int, string> $emails) : array<string|int, mixed>
Parameters
$moduleName : string
$fieldName : string
$emails : array<string|int, string>
Return values
array<string|int, mixed>

crmids

set()

Function to set the value for a given key.

public set(string $key, mixed $value) : $this
Parameters
$key : string
$value : mixed
Return values
$this

setAccount()

Set account.

public setAccount(array<string|int, mixed> $account) : mixed
Parameters
$account : array<string|int, mixed>
Return values
mixed

setData()

Function to set all the values.

public setData(mixed $values) : $this
Parameters
$values : mixed
Return values
$this

setFolder()

Set folder.

public setFolder(string $folder) : mixed
Parameters
$folder : string
Return values
mixed

setMailCrmId()

Set mail crm id.

public setMailCrmId(int $id) : mixed
Parameters
$id : int
Return values
mixed

getFileFromImage()

Get file from image.

private getFileFromImage(DOMElement $element, array<string|int, mixed> $params, array<string|int, mixed> &$attachments) : array<string|int, mixed>
Parameters
$element : DOMElement
$params : array<string|int, mixed>
$attachments : array<string|int, mixed>
Return values
array<string|int, mixed>

        

Search results