Logo Search packages:      
Sourcecode: egroupware version File versions  Download package

Public Member Functions | Public Attributes

mail_msg_base Class Reference

Inheritance diagram for mail_msg_base:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 addslashes_gpc ($data)
 addy_array_to_str ($data, $include_personal=True)
 array_search_ex ($needle='', $haystack='', $strict=False)
 batch_expire_cached_items ($called_by='not_specified', $only_msgball_list=False)
 begin_request ($args_array)
 body_hard_wrap ($in='', $size=78)
 body_hard_wrap_ex ($in, $size=80)
 care_about_unseen ($folder)
 db_defang_decode ($str)
 db_defang_encode ($str)
 de_base64 ($text)
 decode_header_glob ($data)
 decode_header_string ($string)
 decode_header_string_mb ($string)
 decode_header_string_orig ($string)
 decode_rfc_header ($data)
 decrypt_email_passwd ($data)
 encode_charset_word ($string)
 encode_header ($data, $charset='')
 encrypt_email_passwd ($data)
 end_request ($args_array='')
 ensure_no_brackets ($feed_str='')
 ensure_one_urlencoding ($str='')
 ensure_stream_and_folder ($fldball='', $called_from='')
 event_begin_big_end ($called_by='not_specified')
 event_begin_big_move ($fldball='', $called_by='not_specified')
 event_msg_append ($target_fldball='', $called_by='not_specified')
 event_msg_move_or_delete ($msgball='', $called_by='not_specified', $to_fldball='')
 event_msg_seen ($msgball='', $called_by='not_specified')
 explode_linebreaks ($data)
 folder_list_change_callback ($acctnum='')
 folder_lookup ($mailsvr_stream, $folder_needle='INBOX', $acctnum='')
 get_encoded_header_charset ($string)
 get_folder_list ($acctnum='', $force_refresh=False)
 get_folder_long ($feed_folder='INBOX')
 get_folder_short ($feed_folder='INBOX', $acctnum='')
 get_mailsvr_callstr ($acctnum='')
 get_mailsvr_delimiter ($acctnum='')
 get_mailsvr_namespace ($acctnum='')
 get_mailsvr_supports_folders ($acctnum='')
 href_maketag ($href_link='', $href_text='default text')
 href_maketag_class ($href_link='', $href_text='default text', $css_class_name='')
 html_quotes_decode ($str)
 html_quotes_encode ($str)
 htmlspecialchars_decode ($str, $charset='')
 htmlspecialchars_encode ($str, $charset='')
 img_maketag ($location='', $alt='', $height='', $width='', $border='')
 initialize_mail_msg ()
 is_bool_ex ($bool)
 is_imap_folder ($folder)
 is_serialized ($data)
 is_serialized_smarter ($string_data)
 is_serialized_str ($string_data)
 login_error ($called_from='', $acctnum='', $always_try_recover=True)
 loginerr_tryagain_buggy_cert ($called_from='', $error_report='', $mail_server_type='', $acctnum='')
 logout ()
 mail_msg_base ()
 make_boundary ($part_length=4)
 make_flags_str ($hdr_envelope='')
 make_message_id ()
 make_rfc2822_address ($addy_data, $html_encode=True)
 make_rfc_addy_array ($data)
 minimum_version ($vercheck='1.0.0')
 needs_utf7_decoding ($string)
 needs_utf7_encoding ($string)
 normalize_crlf ($data)
 prep_folder_in ($feed_folder, $acctnum='')
 prep_folder_out ($feed_folder='')
 qprint ($string)
 recall_desired_action ()
 stripslashes_gpc ($data)
 substr_count_ex ($haystack='', $needle='')
 using_phpimap_builtin ()
 uwash_string_ok ($namespace='')

Public Attributes

 $a = array()
 $acctnum = 0
 $att_files_dir
 $been_constructed = False
 $browser = 0
 $buffered_delete_commmands = array()
 $buffered_move_commmands = array()
 $buffered_move_commmands_count = 0
 $common_langs = array()
 $dbug = '##NOTHING##'
 $debug_accts = 0
 $debug_allow_magball_list_dumps = False
 $debug_args_input_flow = 0
 $debug_args_oop_access = 0
 $debug_args_special_handlers = 0
 $debug_char_decodings = 0
 $debug_events = 0
 $debug_index_page_display = 0
 $debug_logins = 0
 $debug_longterm_caching = 0
 $debug_message_display = 0
 $debug_session_caching = 0
 $debug_so_class = 0
 $debug_wrapper_dcom_calls = 0
 $del_pseudo_folder = '##DELETE##'
 $ex_accounts_count = 0
 $expect_good_body_crlf = True
 $extra_accounts = array()
 $extra_and_default_acounts = array()
 $fallback_default_acctnum = 0
 $force_msg_uids = True
 $force_sockets = False
 $known_external_args = array()
 $known_internal_args = array()
 $not_set = '-1'
 $nothing = '##NOTHING##'
 $phpgw_before_xslt = '-1'
 $raw_filters = array()
 $ref_FILES = '##NOTHING##'
 $ref_GET = '##NOTHING##'
 $ref_POST = '##NOTHING##'
 $ref_SERVER = '##NOTHING##'
 $ref_SESSION = '##NOTHING##'
 $reply_prefix = '> '
 $session_cache_debug_nosave = False
 $session_cache_enabled = True
 $session_cache_extreme = True
 $skip_args_special_handlers = ''
 $so = '##NOTHING##'
 $timestamp_age_limit = 120
 $unprocessed_prefs = array()
 $use_cached_prefs = True
 $use_private_table = True

Detailed Description

known_external_args List of GET POST variables that the email class and app is supposed to be aware of. In a complex app such as email it becomes difficult to keep track of all the GET POST vars that the app is expected to know about. Therefor, all GPC vars this class is expected to be aware of are listed here with an explanation of what they do.

Parameters:
msgball(typed array) msgball "object" is a message-descriptive "object" or associative arrays that has all important message reference data as array data, passed via URI (real or embedded). With multiple accounts enabled most data such as a folder name or a message number, mean nothing by themselves because we do not know which account they are supposed to apply to. Msgball typed array combines all necessary data, the acctnum, folder, msgnum, and sometimes other data such as part_no, into one thing. Use msgball anytime you are dealing with messages, if you only you do not care about individual email messages, such as when switching from one folder to another, then you can use the fldball typed array, see below, which does not require such detailed information.
fldball(typed array) ldball "object" is an assiciative array of folder data passed via URI (real or embedded). Use fldball when instructing this class to do things that are not specific to any particular message number, such as when opening a stream to an account, or when switching from folder to folder. Generally the least amount of information necessary is fldball[acctnum] (int)and fldball[folder] (string). This class know to expect less information in a fldball, whereas a msgball is expected to contain very detailed information.
fldball_fake_uri(string in the form of a URI request) This is usually sourced from a folder combobox where HTML only allows a single value to be passed, thus we make a string in the syntax of a URI to contain multiple data values in that single HTML element, in this way we embed extra data in an otherwise very limiting HTML element. Note: even php's POST vars array handling can not do anything with a HTML combobox option value. See this example: POST data: folder_fake_uri="fldball['folder']=INBOX&fldball['acctnum']=0" Will be processed into this (using php function "parse_str()" to emulate URI GET behavior) fldball[folder] => INBOX fldball[acctnum] => 0
delmov_list(numbered array with each element being a msgball Fake URI string) Used with mail message moves, appends, and deletes, holds the "from" data, as in move this message "from" here to... and the "to" destimation data is contained in the to_fldball, see below. This comes from the checkbox form data in uiindex.index page, where multiple boxes may be checked but the POST data is limited to a simple string per checkbox, so additional information is embedded in delmov_list and converted to an associative array via php function "parse_str". This is typically used to move or delete a list of messages, but since this array are all msgball items, mail functions such as append and move are no longer limited to one account or one folder, the msgball array can instruct the class to move messages beween different mail accounts of different types and to and from any folder therein.
to_fldball_fake_uri(string in the form of a URI get request) Used to pass complex data deom a combo box which is limited to submitting only a single string. This is generally used to describe the destination acctnum and folder for message moves, appends, and deletes. Php function parse_str is used to make this string data into the typed array to_fldball, see below.
to_fldball(typed array with emements [acctnum] as int, and [folder] as string) Used to describe the destination in mail moves, or appends and it is formed by using php function parse_str on a POST submitted arg "to_fldball_fake_uri".
move_postmove_goto? When moving a message while viewing it in the view message page, this var will be passed used to tell us what to show the user after we do the move, it will be a URI string that begins with "menuaction".
sort?
order?
startthese three vars preserve the users current choice of sort and order between page views and message actions, and start is used to help the app in nextmatches behavior.
td(int) ?
tm(int) ?
tf(string) these three vars are used to === REPORT ON MOVES/DELETES === td = total deleted ; tm = total moved, tm used with tf, folder messages were moved to. usage: (outgoing) class.boaction: when action on a message is taken, report info is passed in these. (in) uiindex.index: here the report is diaplayed above the message list, used to give user feedback. Generally these are in the URI (GET var, not a form POST var)
what(string) === MOVE/DELETE MESSAGE INSTRUCTIONS === Possible Values: (outgoing) class.uiindex "move", "delall", used with delmov_list to move or delete messages. AND with "to_fldball" which is the destination acctnum and folder for the move. (outgoing) uimessage: "delete" used with a msgball to delete or move an individual message directly from the view message page. (in) class.boaction: instruction on what action to preform on 1 or more message(s) (move or delete) NOTE: the destination for the move is described in "delmov_list" which is a msgball list of msgball's which are message-descriptive "objects" or associative arrays that have all the necessary data on each message that is to be deleted or moved. The iuindex.index page uses the same form with different submit buttons (what) so the "delmov_list" is applicable to either deleting or moving messages depending on which submit button was clicked.
action(string) used for === INSTRUCTIONS FOR ACTION ON A MESSAGE OR FOLDER === (a) (out and in) uifolder: used with "target_folder" and (for renaming) "source_folder" and has instructions to add/delete/rename folders: create(_expert), delete(_expert), rename(_expert) where "X_expert" indicates do not modify the target_folder, the user know about of namespaces and delimiters. (b) uicompose: can be "reply" "replyall" "forward" which is passed on to bosend (c) bosend: when set to "forward" and used with "fwd_proc" instructs on how to construct the SMTP mail
msgball[part_no](string) representing a specific MIME part number (example "2.1.2") within a multipart message. Used by (a) uicompose: used in combination with msgball, (b) boaction.get_attach: used in combination with msgball.
encoding(string) possible values "base64" "qprint" Used by (a) uicompose: if replying to, we get the body part to reply to, it may need to be un-qprint-ed, and (b) boaction.get_attach: appropriate decoding of the part to feed to the browser.
fwd_proc(string) Possible Values "encapsulation", "pushdown (not yet supported)" Used as (outgoing) uimessage much detail is known about the messge, there the forward proc method is determined. Used by: (a) uicompose: used with action = forward, (outgoing) passed on to bosend, (b) bosend: used with action = forward, instructs on how the SMTP message should be structured.
name(string) the name of an attachment
type(string) the mime type of an attachment
subtype(string) the mime subtype of an attachment. These 3 args comprise this info is passed to the browser to help the browser know what to do with the part a.k.a. attachment. (outgoing) uimessage: "name" is set in the link to the addressbook, it's the actual "personal" name part of the email address and boaction.get_attach: the name of the attachment. Note these params are NOT part of the msgball array, because with the other data already in msgball, it should be obvious what these items are supposed to apply to.
target_fldball(typed array) and
source_fldball_fake_uri(string of type URI Get) used to make the source_fldball param, see below.
source_fldball(typed array) used for === FOLDER ADD/DELETE/RENAME & DISPLAY === Note param source_fldball is used in renaming folders only. Used for: (outgoing) and (in) bofolder: used with "action" to add/delete/rename a mailbox folder, where "action" can be: create, delete, rename, create_expert, delete_expert, rename_expert.
show_long(string "true" if set) Used by uifolder it is set there and sent back to itself uifolder. If set: indicates to show 'long' folder names with namespace and delimiter NOT stripped off.
to(string) part of === COMPOSE VARS ===
cc(string) ?
bcc(string) ?
body(string) These compose vars, as most commonly NOT used with "mailto" have following usage (note if used with "mailto", less common, then see "mailto" below). Used as: (outgoing) uiindex, uimessage: any click on a clickable email address in these pages, will call uicompose passing "to" (possibly in rfc long form address), (outgoing) uimessage: when reading a message and you click reply, replyall, or forward calls uicompose with EITHER (1) a msgball so that compose gets all needed info, (more effecient than passing all those GPC args) OR (2) to,cc,subject,body may be passed. (outgoing) uicompose: ALL contents of input items to, cc, subject, body, etc... are passed as GPC args to bosend. (in) (a) compose.php: text that should go in to and cc (and maybe subject and body) text boxes are passed as incoming GPC args, and (in) (b) bosend: (fill me in - I got lazy)
sender(string) Less Common Usage RFC says use header "Sender" ONLY WHEN the sender of the email is NOT the author, this is somewhat rare.
req_notifyThis is a recent addition to request notification of delivery for the message being composed
attach_sig(boolean True is set, or not present or unset if False) USAGE (outgoing) uicompose: if checkbox attach sig is checked, this is passed as GPC var to bosent, and (in) bosend: indicate if message should have the user's "sig" added to the message.
msgtype(string) DEPRECIATED, flag to tell phpgw to invoke "special" custom processing of the message extremely rare, may be obsolete (not sure), most implementation code is commented out. Used as: (outgoing) currently NO page actually sets this var, and (a) bosend: will add the flag, if present, to the header of outgoing mail, and (b) bomessage identify the flag and call a custom proc.
personal(string) the name part of an email address,m used with the following param
mailto(string) === MAILTO URI SUPPORT === USAGE (in and out) bocompose: support for the standard mailto html document mail app call can be used with the typical compose vars (see above), indicates that to, cc, and subject should be treated as simple MAILTO args.
no_fmt(boolean) === MESSAGE VIEWING MOD === Usage (in and outgoing) uimessage: will display plain body parts without any html formatting added.
html_part(string) === VIEW HTML INSTRUCTIONS === actually a pre-processed HTML/RELATED MIME part with the image ID's swapped with msgball data for each "related" image, so the MUA may obtain the images from the email server using these msgball details.
force_showsize(boolean) === FOLDER STATISTICS - CALCULATE TOTAL FOLDER SIZE. As a speed up measure, and to reduce load on the IMAP server, there is an option to skip the calculating of the total folder size if certain conditions are met, such as more then 100 messages in a folder, the user may request an override of this for 1 page view.
mlist_set=== SEARCH RESULT MESSAGE SET === DEPRECIATED - not yet fixed.
folder(string) most often a part of a msgball or fldball, the function begin_request will obtain the folder value from (1) args_array, the args passed directly to the begin_request function in the form of folder => Sent, if any, or (2) a fldball GPC or (3) a msgball GPC, or (4) default "INBOX". === THE FOLDER ARG discussion === Folder name is used in almost every procedure, IMAP can be logged into only one folder at a time and POP3 has only one folder anyway (INBOX), INBOX is the assumed default value for "folder". (array) list of folder names (not urlencoded) that need to be expunged, if any, for an account
ex_acctnum(int) all preference handling of extra accounts passes this as the account number "ex" = "extra".
COMPLETE_ME,arethere more GPC args we use in the email app?

One of three classes that combine to form the mail_msg object. The other classes are mail_msg_wrappers and filename mail_msg_display which is actually called mail_msg because it is the final class extension loaded and therefor bears the name we want the class as a whole to have, This class forms the common core of the email functionality,

Author:
Angles, and with some small remnants of Aeromail present The three files and classes inter relate in the following way to end up with the mail_msg object FIRST, include class mail_msg_base, then SECONDLY incluse mail_msg_wrappers extending mail_msg_base, then THIRDLY include mail_msg which extends mail_msg_wrappers and, by inheritance, mail_msg_base All functions that are at the heart of email functionality are in this class. This class is in the process of being further OOPd so programmers can more easily use it without having to know abou the internal details. When multiple accounts are in use, each active account can be accessed and controlled through this class. Each active account with a stream open to its maiul server has its own DataCommunications object which used to be a part of this class but had to be moved elsewhere for PHP3 compatibility, but still each DataCommunications object is in an array and is accessed via an account number which is comtrolled in this class. This class handles organizing the preferences for each of the multiple accounts. In general, a simple class var array keeps the multiple account information organized as a numbered array based on integer account number. There are already many OOP methods that hide complexities from the programmer, such as the preference and arg access functions. Many of those functions can optionally take an account number and foilder name, but if none is supplies the functions uses logic to obtain valid account number and folder name for whatever account you are dealing with. There is extensice debug output available by setting the various debug flags between 1 to 3, or to 0 if no debug is wanted. More documentation is provided for each function in this class.

Definition at line 231 of file class.mail_msg_base.inc.php.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index