Property | Type | Description | |
---|---|---|---|
$addtobody | Message to add to body to build ticket | ||
$altfiles | structure used to store alt files attached to a mail | ||
$body_converted | Body converted | ||
$charset | working charset of the mail | ||
$dohistory | |||
$fetch_emails | Number of fetched emails | ||
$files | structure used to store files attached to a mail | ||
$filesize_max | Max size for attached files | ||
$marubox | IMAP / POP connection | ||
$maxfetch_emails | Maximum number of emails to fetch : default to 10 | ||
$mid | ID of the current message | ||
$rightname | |||
$structure | structure used to store the mail structure | ||
$tags | Tag used to recognize embedded images of a mail |
Method | Description | |
---|---|---|
buildTicket ( $i, $options = [] ) : ticket | function buildTicket - Builds,and returns, the major structure of the ticket to be entered. | |
canCreate ( ) | ||
canPurge ( ) | ||
cleanDBonPurge ( ) | ||
cleanMailContent ( $string, $striptags = true ) : cleaned | Clean mail content : HTML + XSS + blacklisted content | |
close_mailbox ( ) | Close The Mail Box | |
collect ( $mailgateID, $display ) : if | Constructor | |
connect ( ) | Connect to the mail box | |
cronInfo ( $name ) | ||
cronMailgate ( $task ) : -1 | Cron action on mailgate : retrieve mail and create tickets | |
cronMailgateError ( $task ) | Send Alarms on mailgate errors | |
decodeMimeString ( $mimeStr, $inputCharset = 'utf-8', $targetCharset = 'utf-8', $fallbackCharset = 'iso-8859-1' ) : decoded | Receive a string with a mail header and returns it decoded to a specified charset. | |
defineTabs ( $options = [] ) | ||
deleteMails ( $mid, $folder = '' ) : boolean | Delete mail from that mail box | |
deleteOrImportSeveralEmails ( $emails_ids = [], $action, $entity ) | ||
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
getAdditionalMenuOptions ( ) | ||
getAdditionnalHeaders ( $mid ) | ||
getAttached ( $mid, $path, $maxsize ) : array | Public function : get attached documents in a mail | |
getBody ( $mid ) | Get The actual mail content from this mail | |
getHeaders ( $mid ) : Return | This function is use full to Get Header info from particular mail | |
getNumberOfActiveMailCollectors ( ) | ||
getNumberOfMailCollectors ( ) | ||
getRecursiveAttached ( $mid, $path, $maxsize, $structure, $part = "" ) | Private function : Recursivly get attached documents | |
getSearchOptions ( ) | ||
getStructure ( $mid ) | get the message structure if not already retrieved | |
getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
getTotalMails ( ) : an | Used to get total unread mail from that mailbox | |
getTypeName ( $nb ) | ||
get_mime_type ( &$structure ) : mime | Get Mime type Internal Private Use | |
get_part ( $stream, $msg_number, $mime_type, $structure = false, $part_number = false ) : data | Get Part Of Message Internal Private Use | |
mb_list_lowerencodings ( ) | return supported encodings in lowercase. | |
post_getEmpty ( ) | ||
prepareInputForAdd ( $input ) | ||
prepareInputForUpdate ( $input ) | ||
sendMailRefusedResponse ( $to = '', $subject = '' ) | ||
showForm ( $ID, $options = [] ) : boolean | Print the mailgate form | |
showGetMessageForm ( $ID ) | ||
showMaxFilesize ( $name, $value ) | ||
showSystemInformations ( $width ) | ||
textCleaner ( $text ) : clean | function textCleaner - Strip out unwanted/unprintable characters from the subject. | |
title ( ) | ||
unsetUndisclosedFields ( &$fields ) |
Method | Description | |
---|---|---|
getDecodedFetchbody ( $structure, $mid, $part ) : boolean | string | Summary of getDecodedFetchbody used to get decoded part from email |
public buildTicket ( $i, $options = [] ) : ticket | ||
$i | mail ID | |
$options | array of possible options | |
return | ticket | fields array |
public cleanMailContent ( $string, $striptags = true ) : cleaned | ||
$string | text to clean | |
$striptags | remove html tags | |
return | cleaned | text |
public collect ( $mailgateID, $display ) : if | ||
$mailgateID | ID of the mailgate | |
$display | display messages in MessageAfterRedirect or just return error (default 0=) | |
return | if | $display = false return messages result string |
static public cronMailgate ( $task ) : -1 | ||
$task | ||
return | -1 |
static public cronMailgateError ( $task ) | ||
$task | for log |
public decodeMimeString ( $mimeStr, $inputCharset = 'utf-8', $targetCharset = 'utf-8', $fallbackCharset = 'iso-8859-1' ) : decoded | ||
$mimeStr | mime header string | |
$inputCharset | input charset (default 'utf-8') | |
$targetCharset | target charset (default 'utf-8') | |
$fallbackCharset | charset used if input charset not supported by mb (default 'iso-8859-1') | |
return | decoded | string |
public deleteMails ( $mid, $folder = '' ) : boolean | ||
$mid | String mail Id | |
$folder | String folder to move (delete if empty) (default '') | |
return | boolean |
public deleteOrImportSeveralEmails ( $emails_ids = [], $action, $entity ) | ||
$emails_ids | array | |
$action | (default 0) | |
$entity | (default 0) |
static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
$item | CommonGLPI | CommonGLPI object |
$tabnum | (default 1 | |
$withtemplate | (default 0) |
public getAttached ( $mid, $path, $maxsize ) : array | ||
$mid | message id | |
$path | temporary path | |
$maxsize | of document to be retrieved | |
return | array | containing extracted filenames in file/_tmp |
public getBody ( $mid ) | ||
$mid | : mail Id |
public getHeaders ( $mid ) : Return | ||
$mid | = Mail Id of a Mailbox | |
return | Return | Associative array with following keys subject => Subject of Mail to => To Address of that mail toOth => Other To address of mail toNameOth => To Name of Mail from => From address of mail fromName => Form Name of Mail |
static public getNumberOfActiveMailCollectors ( ) |
public getRecursiveAttached ( $mid, $path, $maxsize, $structure, $part = "" ) | ||
$mid | message id | |
$path | temporary path | |
$maxsize | of document to be retrieved | |
$structure | of the message or part | |
$part | part for recursive Result is stored in $this->files |
public getStructure ( $mid ) | ||
$mid | : Message ID. |
public getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
$item | CommonGLPI |
public getTotalMails ( ) : an | ||
return | an | integer (Total Mail) |
public get_mime_type ( &$structure ) : mime | ||
$structure | mail structure | |
return | mime | type |
public get_part ( $stream, $msg_number, $mime_type, $structure = false, $part_number = false ) : data | ||
$stream | An IMAP stream returned by imap_open | |
$msg_number | The message number | |
$mime_type | mime type of the mail | |
$structure | structure of the mail (false by default) | |
$part_number | The part number (false by default) | |
return | data | of false if error |
public mb_list_lowerencodings ( ) |
public sendMailRefusedResponse ( $to = '', $subject = '' ) | ||
$to | (default '') | |
$subject | (default '') |
static public showMaxFilesize ( $name, $value ) | ||
$name | ||
$value | (default 0) |
public textCleaner ( $text ) : clean | ||
$text | text to clean | |
return | clean | text |
public $maxfetch_emails |