dolibarr 21.0.0-alpha
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{0:string,1:string,2:string}> Array of tabs to show

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:int,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
string$fposposition de la pièce jointe
integer$typetype de la pièce jointe
object$mboxobject connection imap
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().