* - Send mail
* - Save As Draft
*
- * @copyright 1999-2018 The SquirrelMail Project Team
+ * @copyright 1999-2021 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
/**
* 1) Remove the addresses we'll be sending the message 'to'
*/
- if (isset($header->reply_to)) {
+ if (isset($header->reply_to) && is_array($header->reply_to) && count($header->reply_to)) {
$excl_ar = $header->getAddr_a('reply_to');
+ } else if (is_object($header->reply_to)) { /* unneccesarry, just for failsafe purpose */
+ $excl_ar = $header->getAddr_a('reply_to');
+ } else {
+ $excl_ar = $header->getAddr_a('from');
}
/**
* 2) Remove our identities from the CC list (they still can be in the
}
$attach = array();
- global $username, $attachment_dir;
+ global $username, $attachment_dir, $upload_filesize_divisor;
+ if (empty($upload_filesize_divisor))
+ $upload_filesize_divisor = 1000; // *not* 1024 -- does this break for some users?
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
if (!empty($attach_array)) {
foreach ($attach_array as $key => $attachment) {
$max = min($sizes);
$oTemplate->assign('max_file_size', empty($max) ? -1 : $max);
$oTemplate->assign('attachments', $attach);
+ $oTemplate->assign('upload_filesize_divisor', $upload_filesize_divisor);
// access keys...
//