dolibarr 20.0.0
emailcollector.lib.php File Reference

Library files with common functions for EmailCollector. More...

Go to the source code of this file.

Functions

 emailcollectorPrepareHead ($object)
 Prepare array of tabs for EmailCollector.
 
 getParts ($structure)
 Get parts of a message.
 
 getDParameters ($part)
 Array with joined files.
 
 getAttachments ($jk, $mbox)
 Get attachments of a given mail.
 
 getFileData ($jk, $fpos, $type, $mbox)
 Get content of a joined file from its position into a given email.
 
 saveAttachment ($path, $filename, $data)
 Save the attached file into a directory with a given name.
 
 getDecodeValue ($message, $coding)
 Decode content of a message.
 

Detailed Description

Library files with common functions for EmailCollector.

Definition in file emailcollector.lib.php.

Function Documentation

◆ emailcollectorPrepareHead()

emailcollectorPrepareHead ( $object)

Prepare array of tabs for EmailCollector.

Parameters
EmailCollector$objectEmailCollector
Returns
array Array of tabs

Definition at line 32 of file emailcollector.lib.php.

References $object, and complete_head_from_modules().

◆ getAttachments()

getAttachments ( $jk,
$mbox )

Get attachments of a given mail.

Parameters
integer$jkNumber of email
object$mboxobject connection imap
Returns
array<array{type:string,filename:string,pos:int}> type, filename, pos

Definition at line 118 of file emailcollector.lib.php.

References getDParameters(), and getParts().

◆ getDecodeValue()

getDecodeValue ( $message,
$coding )

Decode content of a message.

Parameters
string$messageMessage
integer$codingType of content
Returns
string Decoded message

Definition at line 200 of file emailcollector.lib.php.

Referenced by getFileData().

◆ getDParameters()

getDParameters ( $part)

Array with joined files.

Parameters
object$partPart of message
Returns
object|boolean Definition of message|false in case of error

Definition at line 106 of file emailcollector.lib.php.

Referenced by getAttachments().

◆ getFileData()

getFileData ( $jk,
$fpos,
$type,
$mbox )

Get content of a joined file from its position into a given email.

Parameters
integer$jknuméro du mail
integer$fposposition de la pièce jointe
integer$typetype de la pièce jointe
object$mboxobject connection imaap
Returns
mixed data

Definition at line 155 of file emailcollector.lib.php.

References getDecodeValue().

◆ getParts()

getParts ( $structure)

Get parts of a message.

Parameters
object$structureStructure of message
Returns
array|false Array of parts of the message|false if error

Definition at line 95 of file emailcollector.lib.php.

Referenced by getAttachments().

◆ saveAttachment()

saveAttachment ( $path,
$filename,
$data )

Save the attached file into a directory with a given name.

Parameters
string$pathPath to file
string$filenameName of file
mixed$dataContent to save
Returns
string|-1 Return the path to the saved file, or -1 if error

Definition at line 171 of file emailcollector.lib.php.

References dol_mkdir().