Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Functions
ezmailfunctions.php File Reference

Go to the source code of this file.

## Functions
| getHeaders (&$mail, $imap_stream, $msgno)
| getDecodedHeader ( $headervalue)
| disectThisPart ( $this_part, $part_no, $mbox, $msgnum, &$mail, $level=0)
| addAttachment (&$mail, &$data, $fileName)
& | decode ( $enctype, &$value)
| get_mime_type (&$structure)
| getPart ($stream, $msg_number, $mime_type, $structure=false, $part_number=false)

## Function Documentation

## ◆ addAttachment()

addAttachment | ( | & | $mail,
|  | & | $data,
|  |  | $fileName
| ) |  |

Convenience function for adding an attachment to a mail. Dumps the data to a file creates a virtual file and adds this to the mail.

Definition at line 190 of file ezmailfunctions.php.

References $file, $fileName, and $mail.

Referenced by disectThisPart().

## ◆ decode()

& decode | ( |  | $enctype,
|  | & | $value
| ) |  |

Decodes a value encoded with enctype. Returns the decoded value.

Definition at line 209 of file ezmailfunctions.php.

References $ret.

Referenced by disectThisPart().

## ◆ disectThisPart()

disectThisPart | ( |  | $this_part,
|  |  | $part_no,
|  |  | $mbox,
|  |  | $msgnum,
|  | & | $mail,
|  |  | $level = `0`
| ) |  |

This is the main function that fetches the body parts of a message. Basicly there can be two types of body parts. Normal parts and multiparts which can contain several underparts. In case this is a multipart we just call ourselves recursivly. If not this is either a text part which we add to the main text body, or it is something else, an attachment. In addition to this there is also a special disposition part where attachments and inlines CAN be stored. TODO: -If we get text/HTML we should strip the crappy html/header tags and show it as HTML.. for this we need some special function in eZMail either indication that the body of this mail is html or we need to store it completely seperatly from the usual body. -fetch inline images in html mail.

Check for disposition parts

Not a disposittion part, lets see what this is

ooh, its a text part, lets add it to the main body TODO: Unless filename supplied.. attachment in that case..

O no.. multipart we must do it all over again. Lets call ourselves then

Since we are web mail nothing special can be done with this other stuff that people may attach. (Hm... autodownload and start executables?!? hehe!)

Hm... someone sent us something we don't know what is... lets leave it alone

Definition at line 92 of file ezmailfunctions.php.

References $i, $level, $mail, addAttachment(), and decode().

Referenced by eZMailAccount\checkMail(), and eZMailAccount\getNewMail().

## ◆ get_mime_type()

get_mime_type | ( | & | $structure | ) |

Definition at line 242 of file ezmailfunctions.php.

Referenced by getPart().

## ◆ getDecodedHeader()

getDecodedHeader | ( |  | $headervalue | ) |

Definition at line 63 of file ezmailfunctions.php.

References $i, and $ret.

Referenced by getHeaders().

## ◆ getHeaders()

getHeaders | ( | & | $mail,
|  |  | $imap_stream,
|  |  | $msgno
| ) |  |

Gets all the headers from a mail, and puts them into an eZMail object.

Definition at line 40 of file ezmailfunctions.php.

References $headers, $mail, and getDecodedHeader().

Referenced by eZMailAccount\checkMail(), and eZMailAccount\getNewMail().

## ◆ getPart()

getPart | ( |  | $stream,
|  |  | $msg_number,
|  |  | $mime_type,
|  |  | $structure = `false`,
|  |  | $part_number = `false`
| ) |  |

Definition at line 253 of file ezmailfunctions.php.

References $index, and get_mime_type().

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.