phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: email/inc class.boaction.inc.php,1.9,1.10 class.


From: Angelo Tony Puglisi <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email/inc class.boaction.inc.php,1.9,1.10 class.bomessage.inc.php,1.4,1.5 class.mail_send.inc.php,1.7,1.8
Date: Fri, 11 Jan 2002 01:10:34 -0500

Update of /cvsroot/phpgroupware//email/inc
In directory subversions:/tmp/cvs-serv2321/email/inc

Modified Files:
        class.boaction.inc.php class.bomessage.inc.php 
        class.mail_send.inc.php 
Log Message:
various bug fixes, class send falls back to default smtp port 25 if the admin 
didnt specify one

Index: class.boaction.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.boaction.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.boaction.inc.php      3 Jan 2002 10:03:27 -0000       1.9
--- class.boaction.inc.php      11 Jan 2002 06:10:32 -0000      1.10
***************
*** 20,25 ****
                        'view_html'     => True
                );
!               //var $debug = True;
!               var $debug = False;
                var $xml_functions = array();
                var $xi = array();
--- 20,25 ----
                        'view_html'     => True
                );
!               var $debug = 0;
!               //var $debug = 4;       
                var $xml_functions = array();
                var $xi = array();
***************
*** 43,56 ****
                        $attempt_reuse = False;
                        
!                       if ($this->debug) { echo 'emai.boaction.delmov: 
ENTERED, about to create mail_msg object, attempt to reuse (outgoing): 
'.serialize($attempt_reuse ).'<br>'; }
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
is_object test: $GLOBALS[phpgw]->msg is already set, do not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
is_object test: $GLOBALS[phpgw]->msg is NOT set, creating mail_msg object<br>'; 
}
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
                        $args_array = Array();
                        $args_array['do_login'] = True;
--- 43,57 ----
                        $attempt_reuse = False;
                        
!                       if ($this->debug > 0) { echo 'emai.boaction.delmov: 
ENTERED, about to create mail_msg object, attempt to reuse (outgoing): 
'.serialize($attempt_reuse ).'<br>'; }
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: is_object test: $GLOBALS[phpgw]->msg is already set, do 
not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: is_object test: $GLOBALS[phpgw]->msg is NOT set, 
creating mail_msg object<br>'; }
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
+                       $not_set = $GLOBALS['phpgw']->msg->not_set;
                        $args_array = Array();
                        $args_array['do_login'] = True;
***************
*** 72,76 ****
                        if ($GLOBALS['phpgw']->msg->get_arg_value('what') == 
"move")
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
get_arg_value(what) == "move") <br>'; }
                                // called by the "move selected messages to" 
listbox onChange action
                                
--- 73,77 ----
                        if ($GLOBALS['phpgw']->msg->get_arg_value('what') == 
"move")
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: get_arg_value(what) == "move") <br>'; }
                                // called by the "move selected messages to" 
listbox onChange action
                                
***************
*** 106,120 ****
                                for ($i = 0; $i < count($delmov_list); $i++)
                                {
!                                       if ($this->debug) { echo 
'email.boaction.delmov: in mail move loop ['.(string)($i+1).'] of 
['.$tm.']<br>'; }
                                        $mov_msgball = $delmov_list[$i];
                                        $mov_msgball['folder'] = 
$GLOBALS['phpgw']->msg->prep_folder_in($mov_msgball['folder']);
                                        $mov_msgball['acctnum'] = 
(int)$mov_msgball['acctnum'];
                                        $did_move = False;
!                                       if ($this->debug) { echo 
'email.boaction.delmov: calling  
$GLOBALS[phpgw]->msg->interacct_mail_move('.serialize($mov_msgball).', 
'.serialize($to_fldball).'<br>'; }
                                        $did_move = 
$GLOBALS['phpgw']->msg->interacct_mail_move($mov_msgball, $to_fldball);
                                        if ($did_move == False)
                                        {
                                                // error
!                                               if ($this->debug) { echo 
'email.boaction.delmov: ***ERROR**** 
$GLOBALS[phpgw]->msg->interacct_mail_move() returns FALSE, ERROR, break out of 
loop<br>'
                                                                .' * * Server 
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'; }
                                                break;
--- 107,121 ----
                                for ($i = 0; $i < count($delmov_list); $i++)
                                {
!                                       if ($this->debug > 2) { echo 
'email.boaction.delmov: in mail move loop ['.(string)($i+1).'] of 
['.$tm.']<br>'; }
                                        $mov_msgball = $delmov_list[$i];
                                        $mov_msgball['folder'] = 
$GLOBALS['phpgw']->msg->prep_folder_in($mov_msgball['folder']);
                                        $mov_msgball['acctnum'] = 
(int)$mov_msgball['acctnum'];
                                        $did_move = False;
!                                       if ($this->debug > 2) { echo 
'email.boaction.delmov: calling  
$GLOBALS[phpgw]->msg->interacct_mail_move('.serialize($mov_msgball).', 
'.serialize($to_fldball).'<br>'; }
                                        $did_move = 
$GLOBALS['phpgw']->msg->interacct_mail_move($mov_msgball, $to_fldball);
                                        if ($did_move == False)
                                        {
                                                // error
!                                               if ($this->debug > 0) { echo 
'email.boaction.delmov: ***ERROR**** 
$GLOBALS[phpgw]->msg->interacct_mail_move() returns FALSE, ERROR, break out of 
loop<br>'
                                                                .' * * Server 
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'; }
                                                break;
***************
*** 122,129 ****
                                        else
                                        {
!                                               if ($this->debug) { echo 
'email.boaction.delmov: $GLOBALS[phpgw]->msg->interacct_mail_move() returns 
True, calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$mov_msgball['acctnum'].')<br>'; }
                                                $did_expunge = False;
                                                $did_expunge = 
$GLOBALS['phpgw']->msg->phpgw_expunge($mov_msgball['acctnum']);
!                                               if ($this->debug) { echo 
'email.boaction.delmov: $GLOBALS[phpgw]->msg->phpgw_expunge() returns 
'.serialize($did_expunge).'<br>'; }
                                        }
                                }
--- 123,130 ----
                                        else
                                        {
!                                               if ($this->debug > 0) { echo 
'email.boaction.delmov: $GLOBALS[phpgw]->msg->interacct_mail_move() returns 
True, calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$mov_msgball['acctnum'].')<br>'; }
                                                $did_expunge = False;
                                                $did_expunge = 
$GLOBALS['phpgw']->msg->phpgw_expunge($mov_msgball['acctnum']);
!                                               if ($this->debug > 2) { echo 
'email.boaction.delmov: $GLOBALS[phpgw]->msg->phpgw_expunge() returns 
'.serialize($did_expunge).'<br>'; }
                                        }
                                }
***************
*** 170,174 ****
                        elseif ($GLOBALS['phpgw']->msg->get_arg_value('what') 
== 'delall')
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
get_arg_value(what) == "delall") <br>'; }
                                // this is called from the index pge after you 
check some boxes and click "delete" button
                                
--- 171,175 ----
                        elseif ($GLOBALS['phpgw']->msg->get_arg_value('what') 
== 'delall')
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: get_arg_value(what) == "delall") <br>'; }
                                // this is called from the index pge after you 
check some boxes and click "delete" button
                                
***************
*** 177,181 ****
                                for ($i = 0; $i < $loops; $i++)
                                {
!                                       if ($this->debug) { echo 
'email.boaction.delmov: (delete) in mail delete loop ['.(string)($i+1).'] of 
['.$loops.']<br>'; }
                                        $this_msgnum = 
$delmov_list[$i]['msgnum'];
                                        // was_in_folder is used in Trash 
handling in the ->phpgw_delete function
--- 178,182 ----
                                for ($i = 0; $i < $loops; $i++)
                                {
!                                       if ($this->debug > 2) { echo 
'email.boaction.delmov: (delete) in mail delete loop ['.(string)($i+1).'] of 
['.$loops.']<br>'; }
                                        $this_msgnum = 
$delmov_list[$i]['msgnum'];
                                        // was_in_folder is used in Trash 
handling in the ->phpgw_delete function
***************
*** 187,191 ****
                                        {
                                                // error
!                                               if ($this->debug) { echo 
'email.boaction.delmov: (delete) ***ERROR**** 
$GLOBALS[phpgw]->msg->phpgw_delete() returns FALSE, ERROR, break out of 
loop<br>'
                                                                .' * * Server 
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'; }
                                                break;
--- 188,192 ----
                                        {
                                                // error
!                                               if ($this->debug > 0) { echo 
'email.boaction.delmov: (delete) ***ERROR**** 
$GLOBALS[phpgw]->msg->phpgw_delete() returns FALSE, ERROR, break out of 
loop<br>'
                                                                .' * * Server 
reports error: '.$GLOBALS['phpgw']->msg->phpgw_server_last_error().'<br>'; }
                                                break;
***************
*** 193,200 ****
                                        else
                                        {
!                                               if ($this->debug) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_delete() returns 
True, calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].')<br>'; }
                                                $did_expunge = False;
                                                $did_expunge = 
$GLOBALS['phpgw']->msg->phpgw_expunge((int)$delmov_list[$i]['acctnum']);
!                                               if ($this->debug) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_expunge() returns 
'.serialize($did_expunge).'<br>'; }
                                        }
                                }
--- 194,201 ----
                                        else
                                        {
!                                               if ($this->debug > 0) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_delete() returns 
True, calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].')<br>'; }
                                                $did_expunge = False;
                                                $did_expunge = 
$GLOBALS['phpgw']->msg->phpgw_expunge((int)$delmov_list[$i]['acctnum']);
!                                               if ($this->debug > 2) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_expunge() returns 
'.serialize($did_expunge).'<br>'; }
                                        }
                                }
***************
*** 228,240 ****
                        elseif ($GLOBALS['phpgw']->msg->get_arg_value('what') 
== "delete_single_msg")
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
get_arg_value(what) == "delete_single_msg") <br>'; }
                                // called by clicking the "X" dutton while 
reading an individual message
                                $msgball = 
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
-                               
$GLOBALS['phpgw']->msg->phpgw_delete($msgball['msgnum'],'',$msgball['folder'], 
(int)$msgball['acctnum']);
-                               
                                
                                $nav_data = 
$GLOBALS['phpgw']->msg->prev_next_navigation($folder_info['number_all']);
!                               if ($this->debug > 2) { echo 
'emai.boaction.delmov: $nav_data[] dump <pre>: '; print_r($nav_data); echo 
'</pre>'; }
!                               
                                // ----  "Go To Previous Message" Handling  
-----
                                if ($nav_data['prev_msg'] != $not_set)
--- 229,239 ----
                        elseif ($GLOBALS['phpgw']->msg->get_arg_value('what') 
== "delete_single_msg")
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: get_arg_value(what) == "delete_single_msg") <br>'; }
                                // called by clicking the "X" dutton while 
reading an individual message
                                $msgball = 
$GLOBALS['phpgw']->msg->get_arg_value('msgball');
                                
+                               // BEFORE we delete, if there is no mext 
message, then we will go back to index page
                                $nav_data = 
$GLOBALS['phpgw']->msg->prev_next_navigation($folder_info['number_all']);
!                               if ($this->debug > 2) { echo 
'emai.boaction.delmov: delete_single_msg: pre-delete $nav_data[] dump <pre>: '; 
print_r($nav_data); echo '</pre>'; }
                                // ----  "Go To Previous Message" Handling  
-----
                                if ($nav_data['prev_msg'] != $not_set)
***************
*** 254,258 ****
                                                '/index.php',
                                                 
'menuaction=email.uiindex.index'
!                                               
.'&fldball[folder]='.$GLOBALS['phpgw']->msg->prep_folder_out($msgball['folder'])
                                                
.'&fldball[acctnum]='.$msgball['acctnum']
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
--- 253,257 ----
                                                '/index.php',
                                                 
'menuaction=email.uiindex.index'
!                                               
.'&fldball[folder]='.$msgball['folder']
                                                
.'&fldball[acctnum]='.$msgball['acctnum']
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
***************
*** 260,265 ****
                                                
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                                }
                                
!                               
$GLOBALS['phpgw']->msg->phpgw_expunge((int)$msgball['acctnum']);
                                
                                // reuse NOT yet supported
--- 259,276 ----
                                                
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                                }
+                               if ($this->debug > 1) { echo 
'emai.boaction.delmov: delete_single_msg: pre-delete determination of 
$this->redirect_to : ['.$this->redirect_to.']<br>'; }
                                
!                               
!                               if ($this->debug > 3)
!                               {
!                                       echo 'emai.boaction.delmov: 
delete_single_msg: debug flag = 4 or higher, _SKIP_ the delete and expunge 
action<br>';
!                               }
!                               else
!                               {
!                                       // ok, now do the delete
!                                       
$GLOBALS['phpgw']->msg->phpgw_delete($msgball['msgnum'],'',$msgball['folder'], 
(int)$msgball['acctnum']);
!                                       // now do the expunge, both IMAP and 
POP3 require this, or the message is not really deleted
!                                       
$GLOBALS['phpgw']->msg->phpgw_expunge((int)$msgball['acctnum']);
!                               }
                                
                                // reuse NOT yet supported
***************
*** 275,279 ****
                        else
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
get_arg_value(what) == unknown_value<br>'; }
                                $error_str = '<p><center><b>'.lang('UNKNOWN 
ACTION')."<br> \r\n"
                                                .'called from 
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
--- 286,290 ----
                        else
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: get_arg_value(what) == unknown_value<br>'; }
                                $error_str = '<p><center><b>'.lang('UNKNOWN 
ACTION')."<br> \r\n"
                                                .'called from 
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
***************
*** 295,299 ****
                        && (count($goto_args) > 0))
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
LEAVING, gonna try to reuse existing mail_msg for the upcoming page view<br>'; }
                                // attempting to reuse existing object msg
                                $obj = CreateObject('email.uiindex');
--- 306,310 ----
                        && (count($goto_args) > 0))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: LEAVING, gonna try to reuse existing mail_msg for the 
upcoming page view<br>'; }
                                // attempting to reuse existing object msg
                                $obj = CreateObject('email.uiindex');
***************
*** 303,307 ****
                        elseif ($this->redirect_to != '')
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
LEAVING, redirecting to: 
'.$GLOBALS['phpgw']->redirect($this->redirect_to).'<br>'; }
                                $GLOBALS['phpgw']->redirect($this->redirect_to);
                                exit;
--- 314,318 ----
                        elseif ($this->redirect_to != '')
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: LEAVING, redirecting to: 
'.$GLOBALS['phpgw']->redirect($this->redirect_to).'<br>'; }
                                $GLOBALS['phpgw']->redirect($this->redirect_to);
                                exit;
***************
*** 309,313 ****
                        else
                        {
!                               if ($this->debug) { echo 'emai.boaction.delmov: 
LEAVING, with ERROR, unhandled "where to go from here" condition<br>'; }
                                echo 'error: mo redirect specified in 
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
                                        .'error_str: '.$error_str."<br> \r\n";
--- 320,324 ----
                        else
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.delmov: LEAVING, with ERROR, unhandled "where to go from here" 
condition<br>'; }
                                echo 'error: mo redirect specified in 
'.$GLOBALS['PHP_SELF'].', delmov()'."<br> \r\n"
                                        .'error_str: '.$error_str."<br> \r\n";
***************
*** 327,335 ****
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->msg is already set, 
do not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->msg is NOT set, 
creating mail_msg object<br>'; }
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
--- 338,346 ----
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->msg is already set, 
do not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->msg is NOT set, 
creating mail_msg object<br>'; }
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
***************
*** 345,349 ****
                        if (!is_object($GLOBALS['phpgw']->browser))
                        {
!                               if ($this->debug) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->browser needs to be 
created <br>'; }
                                $GLOBALS['phpgw']->browser = 
CreateObject("phpgwapi.browser");
                        }
--- 356,360 ----
                        if (!is_object($GLOBALS['phpgw']->browser))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.get_attach: is_object test: $GLOBALS[phpgw]->browser needs to be 
created <br>'; }
                                $GLOBALS['phpgw']->browser = 
CreateObject("phpgwapi.browser");
                        }
***************
*** 393,401 ****
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->msg is already set, 
do not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->msg is NOT set, 
creating mail_msg object<br>'; }
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
--- 404,412 ----
                        if (is_object($GLOBALS['phpgw']->msg))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->msg is already set, 
do not create again<br>'; }
                        }
                        else
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->msg is NOT set, 
creating mail_msg object<br>'; }
                                $GLOBALS['phpgw']->msg = 
CreateObject("email.mail_msg");
                        }
***************
*** 411,415 ****
                        if (!is_object($GLOBALS['phpgw']->browser))
                        {
!                               if ($this->debug) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->browser needs to be 
created <br>'; }
                                $GLOBALS['phpgw']->browser = 
CreateObject("phpgwapi.browser");
                        }
--- 422,426 ----
                        if (!is_object($GLOBALS['phpgw']->browser))
                        {
!                               if ($this->debug > 0) { echo 
'emai.boaction.view_html: is_object test: $GLOBALS[phpgw]->browser needs to be 
created <br>'; }
                                $GLOBALS['phpgw']->browser = 
CreateObject("phpgwapi.browser");
                        }

Index: class.bomessage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.bomessage.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.bomessage.inc.php     8 Jan 2002 15:06:03 -0000       1.4
--- class.bomessage.inc.php     11 Jan 2002 06:10:32 -0000      1.5
***************
*** 142,147 ****
                                         '/index.php',
                                        'menuaction=email.uiindex.index'        
!                                       
.'&fldball[folder]='.$GLOBALS['phpgw']->msg->prep_folder_out($msgball['folder'])
!                                       
.'&fldball[acctnum]='.$GLOBALS['phpgw']->msg->get_acctnum($msgball['acctnum'])
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
--- 142,147 ----
                                         '/index.php',
                                        'menuaction=email.uiindex.index'        
!                                       .'&fldball[folder]='.$msgball['folder']
!                                       
.'&fldball[acctnum]='.$msgball['acctnum']
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
***************
*** 239,244 ****
                                }
                                // display "From" according to user preferences
!                               if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'])
!                               && 
($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
                                && ($from_personal != $from_plain))
                                {
--- 239,246 ----
                                }
                                // display "From" according to user preferences
!                               //if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'])
!                               //&& 
($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
!                               if 
(($GLOBALS['phpgw']->msg->get_isset_pref('show_addresses'))
!                               && 
($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
                                && ($from_personal != $from_plain))
                                {
***************
*** 257,261 ****
                                                '/index.php',
                                                 
'menuaction=email.uicompose.compose'
!                                               .'&'.$msgball['uri']
                                                .'&to='.urlencode($from_plain)
                                                
.'&personal='.urlencode($from_personal)
--- 259,266 ----
                                                '/index.php',
                                                 
'menuaction=email.uicompose.compose'
!                                                // DO NOT USE msgball - bosend 
will interpret this the wrong way
!                                               //.'&'.$msgball['uri']
!                                               
.'&fldball[folder]='.$msgball['folder']
!                                               
.'&fldball[acctnum]='.$msgball['acctnum']
                                                .'&to='.urlencode($from_plain)
                                                
.'&personal='.urlencode($from_personal)
***************
*** 302,306 ****
                                                $to_personal = 
$GLOBALS['phpgw']->msg->decode_header_string($topeople->personal);
                                        }
!                                       if 
(($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
                                        && ($to_personal != $to_plain))
                                        {
--- 307,312 ----
                                                $to_personal = 
$GLOBALS['phpgw']->msg->decode_header_string($topeople->personal);
                                        }
!                                       //if 
(($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
!                                       if 
(($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
                                        && ($to_personal != $to_plain))
                                        {
***************
*** 316,320 ****
                                                        '/index.php',
                                                         
'menuaction=email.uicompose.compose'
!                                                       .'&'.$msgball['uri']
                                                        
.'&to='.urlencode($to_plain)
                                                        
.'&personal='.urlencode($to_personal)
--- 322,329 ----
                                                        '/index.php',
                                                         
'menuaction=email.uicompose.compose'
!                                                       // DO NOT USE msgball - 
bosend will interpret this the wrong way
!                                                       //.'&'.$msgball['uri']
!                                                       
.'&fldball[folder]='.$msgball['folder']
!                                                       
.'&fldball[acctnum]='.$msgball['acctnum']
                                                        
.'&to='.urlencode($to_plain)
                                                        
.'&personal='.urlencode($to_personal)
***************
*** 362,366 ****
                                                $cc_personal = 
$GLOBALS['phpgw']->msg->decode_header_string($ccpeople->personal);
                                        }
!                                       if 
(($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
                                        && ($cc_personal != $cc_plain))
                                        {
--- 371,376 ----
                                                $cc_personal = 
$GLOBALS['phpgw']->msg->decode_header_string($ccpeople->personal);
                                        }
!                                       //if 
(($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
!                                       if 
(($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
                                        && ($cc_personal != $cc_plain))
                                        {
***************
*** 374,378 ****
                                                        '/index.php',
                                                         
'menuaction=email.uicompose.compose'
!                                                       .'&'.$msgball['uri']
                                                        
.'&to='.urlencode($cc_plain)
                                                        
.'&personal='.urlencode($cc_personal)
--- 384,391 ----
                                                        '/index.php',
                                                         
'menuaction=email.uicompose.compose'
!                                                       // DO NOT USE msgball - 
bosend will interpret this the wrong way
!                                                       //.'&'.$msgball['uri']
!                                                       
.'&fldball[folder]='.$msgball['folder']
!                                                       
.'&fldball[acctnum]='.$msgball['acctnum']
                                                        
.'&to='.urlencode($cc_plain)
                                                        
.'&personal='.urlencode($cc_personal)

Index: class.mail_send.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.mail_send.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.mail_send.inc.php     28 Dec 2001 07:19:36 -0000      1.7
--- class.mail_send.inc.php     11 Jan 2002 06:10:32 -0000      1.8
***************
*** 46,49 ****
--- 46,50 ----
                var $err = array();
                var $to_res = array();
+               var $default_smtp_port = 25;
                
                //var $debug_fake_send = True;
***************
*** 174,180 ****
                        else
                        {
                                // OPEN SOCKET - now we try to open the socket 
and check, if any smtp server responds
!                               $socket = 
fsockopen($GLOBALS['phpgw_info']['server']['smtp_server'],$GLOBALS['phpgw_info']['server']['smtp_port'],$errcode,$errmsg,$timeout);
!                               $this->err['server_chat'] .= 
htmlspecialchars('c->s: 
fsockopen('.$GLOBALS['phpgw_info']['server']['smtp_server'].','.$GLOBALS['phpgw_info']['server']['smtp_port'].','.$errcode.','.$errmsg.','.$timeout.')
 ; returned: '.$socket )."\r\n";
  
                        }
--- 175,189 ----
                        else
                        {
+                               $smtp_server = 
$GLOBALS['phpgw_info']['server']['smtp_server'];
+                               $smtp_port = 
$GLOBALS['phpgw_info']['server']['smtp_port'];
+                               // some people do not set this up correctly in 
the site-wide admin for email
+                               if (empty($smtp_port))
+                               {
+                                       $smtp_port = $this->default_smtp_port;
+                               }
+                               
                                // OPEN SOCKET - now we try to open the socket 
and check, if any smtp server responds
!                               $socket = 
fsockopen($smtp_server,$smtp_port,$errcode,$errmsg,$timeout);
!                               $this->err['server_chat'] .= 
htmlspecialchars('c->s: 
fsockopen('.$smtp_server.','.$smtp_port.','.$errcode.','.$errmsg.','.$timeout.')
 ; returned: '.$socket )."\r\n";
  
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]