This code sends a mail.

There are 4 modes of operation:

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

include_once ('./addrbook_search_html.php') (line 656)

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)
checkInput (line 1587)
void checkInput ( $show)
  • $show
deliverMessage (line 1697)

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 1131)

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 1649)

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 285)

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 776)

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

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

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 787)
void newMail ([ $mailbox = ''], [ $passed_id = ''], [ $passed_ent_id = ''], [ $action = ''], [ $session = ''])
  • $mailbox
  • $passed_id
  • $passed_ent_id
  • $action
  • $session
replyAllString (line 171)

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

void replyAllString ( $header)
  • $header
saveAttachedFiles (line 1610)
void saveAttachedFiles ( $session)
  • $session
showComposeButtonRow (line 1531)
void showComposeButtonRow ()
showInputForm (line 1214)
void showInputForm ( $session, [ $values = false])
  • $session
  • $values

Documentation generated on Tue, 17 Apr 2018 04:22:15 +0200 by phpDocumentor 1.4.3