squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

compose.php File Reference

Go to the source code of this file.

Namespaces

 squirrelmail
 

Functions

 replyAllString ($header)
 
 getReplyCitation ($orig_from, $orig_date)
 
 getforwardHeader ($orig_header)
 
 newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='')
 
 getAttachments ($message, &$composeMessage, $passed_id, $entities, $imapConnection)
 
 getMessage_RFC822_Attachment ($message, $composeMessage, $passed_id, $passed_ent_id='', $imapConnection)
 
 showInputForm ($session, $values=false)
 
 showComposeButtonRow ()
 
 checkInput ($show)
 
 saveAttachedFiles ($session)
 
 getByteSize ($ini_size)
 
 deliverMessage (&$composeMessage, $draft=false)
 

Variables

const PAGE_NAME 'compose'
 
const SM_PATH '../'
 
if(isset($send) && $send) else
 
if(sqgetGlobalVar('return', $temp, SQ_POST)) if(sqgetGlobalVar('mailtodata', $mailtodata, SQ_GET)) $location = get_location()
 
 $idents = get_identities()
 
 $session_expired = false
 
 $rfc822_header = new Rfc822Header()
 
$composeMessage rfc822_header = $rfc822_header
 
$composeMessage reply_rfc822_header = ''
 
if(!isset($passed_ent_id)) if(!isset($passed_id)) if(!isset($mailbox)) if(!isset($action)) $values = newMail($mailbox,$passed_id,$passed_ent_id, $action, $session)
 

Function Documentation

◆ checkInput()

checkInput (   $show)

Definition at line 1429 of file compose.php.

References $body, $color, $subject, _(), and plain_error_message().

◆ deliverMessage()

deliverMessage ( $composeMessage,
  $draft = false 
)

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.

Parameters
object$composeMessageThe 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.
Returns
boolean FALSE if delivery failed, or some non-FALSE value upon success.

Definition at line 1528 of file compose.php.

References $abook, $action, $body, $color, $data_dir, $default_charset, $default_move_to_sent, $domain, $draft_folder, $from, $idents, $imap_stream, $imapPort, $imapServerAddress, $mailbox, $message_body, $pop_before_smtp, $pop_before_smtp_host, $rfc822_header, $sendmail_args, $sendmail_path, $sent_folder, $smtpPort, $smtpServerAddress, $stream, $subject, $username, $useSendmail, _(), addressbook_init(), do_hook(), elseif, encodeHeader(), get_smtp_user(), getPref(), plain_error_message(), SM_PATH, sqimap_login(), sqimap_logout(), sqimap_mailbox_exists(), sqimap_mailbox_select(), and sqimap_messages_flag().

◆ getAttachments()

getAttachments (   $message,
$composeMessage,
  $passed_id,
  $entities,
  $imapConnection 
)

◆ getByteSize()

getByteSize (   $ini_size)

Definition at line 1482 of file compose.php.

Referenced by showInputForm().

◆ getforwardHeader()

getforwardHeader (   $orig_header)

Set $default_charset to correspond with the user's selection of language interface.

This is to change all newlines to
We'll change them to \r
later (in the sendMessage function)

Rewrap $body so that no line is bigger than $editor_size This should only really kick in the sqWordWrap function if the browser doesn't support "VIRTUAL" as the wrap type.

Definition at line 255 of file compose.php.

References $cc, $editor_size, $from, $subject, $to, _(), decodeHeader(), and getLongDateString().

Referenced by newMail().

◆ getMessage_RFC822_Attachment()

getMessage_RFC822_Attachment (   $message,
  $composeMessage,
  $passed_id,
  $passed_ent_id = '',
  $imapConnection 
)

◆ getReplyCitation()

getReplyCitation (   $orig_from,
  $orig_date 
)

To translators: s is for author's name

To translators: first s is for date string, second s is for author's name. Date uses formating from "D, F j, Y g:i a" and "D, F j, Y H:i" translations. Example string: "On Sat, December 24, 2004 23:59, Santa wrote:" If you have to put author's name in front of date string, check comments about argument swapping at http://www.php.net/sprintf

Definition at line 195 of file compose.php.

References $end, $reply_citation_end, $reply_citation_start, $reply_citation_style, _(), decodeHeader(), getLongDateString(), and sprintf.

Referenced by newMail().

◆ newMail()

◆ replyAllString()

replyAllString (   $header)

1) Remove the addresses we'll be sending the message 'to'

2) Remove our identities from the CC list (they still can be in the TO list) only if $include_self_reply_all is turned off

3) get the addresses.

4) generate the string.

Definition at line 150 of file compose.php.

References $data_dir, $header, $id, $idents, $include_self_reply_all, and $username.

Referenced by newMail().

◆ saveAttachedFiles()

saveAttachedFiles (   $session)

Definition at line 1452 of file compose.php.

References $attachment_dir, $data_dir, $username, GenerateRandomString(), and getHashedDir().

◆ showComposeButtonRow()

◆ showInputForm()

Variable Documentation

◆ $idents

$idents = get_identities()

Definition at line 146 of file compose.php.

Referenced by deliverMessage(), newMail(), replyAllString(), and showInputForm().

◆ $location

if (sqgetGlobalVar( 'return', $temp, SQ_POST)) if (sqgetGlobalVar( 'mailtodata', $mailtodata, SQ_GET)) $location = get_location()

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

Definition at line 144 of file compose.php.

Referenced by Message\initAttachment(), and mail_message_listing_beginning().

◆ $rfc822_header

◆ $session_expired

$session_expired = false

Definition at line 294 of file compose.php.

Referenced by showInputForm().

◆ $values

if (!isset( $passed_ent_id)) if (!isset( $passed_id)) if (!isset( $mailbox)) if (!isset( $action)) $values = newMail($mailbox,$passed_id,$passed_ent_id, $action, $session)

Definition at line 661 of file compose.php.

Referenced by address_form(), addressbook_inp_field(), addSelect(), and showInputForm().

◆ else

if (!empty( $attachments)) if (!isset( $mailbox)||$mailbox==''||( $mailbox=='None')) if ( $draft) if ( $send) elseif (isset( $html_addr_search_done)) elseif (isset( $html_addr_search)) elseif (isset( $attach)) elseif (isset( $sigappend)) elseif (isset( $do_delete)) else
Initial value:
{
$SQ_GLOBAL = SQ_FORM

Definition at line 66 of file compose.php.

◆ PAGE_NAME

const PAGE_NAME 'compose'

This is the compose page

Definition at line 21 of file compose.php.

◆ reply_rfc822_header

$composeMessage reply_rfc822_header = ''

Definition at line 364 of file compose.php.

◆ rfc822_header

$composeMessage rfc822_header = $rfc822_header

Definition at line 363 of file compose.php.

Referenced by Message\addRFC822Header().

◆ SM_PATH

const SM_PATH '../'

Path for SquirrelMail required files. @ignore

Definition at line 27 of file compose.php.

Referenced by deliverMessage().

SQ_FORM
const SQ_FORM
Definition: global.php:21