/src/compose.php

Description

compose.php

This code sends a mail.

There are 4 modes of operation:

  • Start new mail
  • Add an attachment
  • Send mail
  • Save As Draft

Includes
include_once ('./addrbook_search_html.php') (line 679)

Rewrap $body so that no line is bigger than $editor_size

require ('../include/init.php') (line 25)

Include the SquirrelMail initialization file.

require_once (SM_PATH.'functions/date.php') (line 37)
require_once (SM_PATH.'functions/addressbook.php') (line 41)
require_once (SM_PATH.'functions/mime.php') (line 38)
require_once (SM_PATH.'functions/forms.php') (line 42)
require_once (SM_PATH.'functions/identity.php') (line 43)
require_once (SM_PATH.'functions/compose.php') (line 39)
Functions
checkInput (line 1610)
void checkInput ( $show)
  • $show
deliverMessage (line 1720)

temporary function to make use of the deliver class.

In the future the responsible backend should be automaticly loaded and conf.pl should show a list of available backends. The message also should be constructed by the message class.

  • return: FALSE if delivery failed, or some non-FALSE value upon success.
boolean deliverMessage ( &$composeMessage, [ $draft = false], object $composeMessage)
  • object $composeMessage: The message being sent. Please note that it is passed by reference and will be returned modified, with additional headers, such as Message-ID, Date, In-Reply-To, References, and so forth.
  • &$composeMessage
  • $draft
getAttachments (line 1154)

downloads attachments from original message, stores them in attachment directory and adds them to composed message.

object getAttachments (object $message,  &$composeMessage, integer $passed_id, mixed $entities, mixed $imapConnection, object $composeMessage)
  • object $message
  • object $composeMessage
  • integer $passed_id
  • mixed $entities
  • mixed $imapConnection
  • &$composeMessage
getByteSize (line 1672)

Parse strings such as "8M" and "2k" into their corresponding size in bytes

NOTE: This function only recognizes the suffixes "K", "M" and "G" and will probably break very easily if the given size is in some completely different format.

  • return: Boolean FALSE if something went wrong (the value passed in was empty?, the suffix was not recognized?), otherwise, the converted size in bytes (just the number (as an integer), no unit identifier included)
mixed getByteSize (string $ini_size)
  • string $ini_size: The input string to be converted
getforwardHeader (line 291)

Creates header fields in forwarded email body

$default_charset global must be set correctly before you call this function.

$string getforwardHeader (object $orig_header)
  • object $orig_header
getforwardSubject (line 799)

************** Only function definitions go below ************

void getforwardSubject ( $subject)
  • $subject
getMessage_RFC822_Attachment (line 1206)
void getMessage_RFC822_Attachment ( $message,  $composeMessage,  $passed_id, [ $passed_ent_id = ''],  $imapConnection)
  • $message
  • $composeMessage
  • $passed_id
  • $passed_ent_id
  • $imapConnection
getReplyCitation (line 228)

creates top line in reply citations

Line style depends on user preferences. $orig_date argument is available only from 1.4.3 and 1.5.1 version.

  • return: reply citation
string getReplyCitation (object $orig_from, integer $orig_date)
  • object $orig_from: From: header object.
  • integer $orig_date: email's timestamp
newMail (line 810)
void newMail ([ $mailbox = ''], [ $passed_id = ''], [ $passed_ent_id = ''], [ $action = ''], [ $session = ''])
  • $mailbox
  • $passed_id
  • $passed_ent_id
  • $action
  • $session
replyAllString (line 172)

Here we decode the data passed in from mailto.php.

void replyAllString ( $header)
  • $header
saveAttachedFiles (line 1633)
void saveAttachedFiles ( $session)
  • $session
showComposeButtonRow (line 1554)
void showComposeButtonRow ()
showInputForm (line 1237)
void showInputForm ( $session, [ $values = false])
  • $session
  • $values

Documentation generated on Mon, 13 Jan 2020 04:22:04 +0100 by phpDocumentor 1.4.3