dolibarr  20.0.0-beta
Functions
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. More...
 
 getParts ($structure)
 Get parts of a message. More...
 
 getDParameters ($part)
 Array with joined files. More...
 
 getAttachments ($jk, $mbox)
 Get attachments of a given mail. More...
 
 getFileData ($jk, $fpos, $type, $mbox)
 Get content of a joined file from its position into a given email. More...
 
 saveAttachment ($path, $filename, $data)
 Save the attached file into a directory with a given name. More...
 
 getDecodeValue ($message, $coding)
 Decode content of a message. More...
 

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.

◆ 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 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.

◆ 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.

◆ 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.

◆ 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.