X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fcompose.php;h=607184b447b2cd29e8446ed2d20d25a128d4aa29;hb=134ee6a85886fe56aec3ef4953790ac398d3f010;hp=f36d40bdc11c54ef0fbf12c99ca11dccf6b573ec;hpb=534f3930f7a15600283454f90a3046c4b3c0e911;p=squirrelmail.git diff --git a/functions/compose.php b/functions/compose.php index f36d40bd..607184b4 100644 --- a/functions/compose.php +++ b/functions/compose.php @@ -6,7 +6,7 @@ * Functions for message compositon: writing a message, attaching files etc. * * @author Thijs Kinkhorst - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2017 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -93,10 +93,8 @@ function sq_get_attach_tempfile() function sq_send_mail($to, $subject, $body, $from, $cc='', $bcc='', $message='') { - require_once(SM_PATH . 'class/mime/Message.class.php'); - require_once(SM_PATH . 'class/mime/Rfc822Header.class.php'); - require_once(SM_PATH . 'class/mime/ContentType.class.php'); - require_once(SM_PATH . 'class/mime/AddressStructure.class.php'); + require_once(SM_PATH . 'functions/mime.php'); + require_once(SM_PATH . 'class/mime.class.php'); if (empty($message)) { @@ -107,9 +105,9 @@ function sq_send_mail($to, $subject, $body, $from, $cc='', $bcc='', $message='') $content_type = new ContentType('text/plain'); global $special_encoding, $default_charset; if ($special_encoding) - $rfc822_header->encoding = $special_encoding; + $header->encoding = $special_encoding; else - $rfc822_header->encoding = '8bit'; + $header->encoding = '8bit'; if ($default_charset) $content_type->properties['charset']=$default_charset; $header->content_type = $content_type; @@ -132,14 +130,16 @@ function sq_send_mail($to, $subject, $body, $from, $cc='', $bcc='', $message='') if (!$useSendmail) { require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php'); $deliver = new Deliver_SMTP(); - global $smtpServerAddress, $smtpPort, $pop_before_smtp, $domain; + global $smtpServerAddress, $smtpPort, $pop_before_smtp, + $domain, $pop_before_smtp_host; $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false; + if (empty($pop_before_smtp_host)) $pop_before_smtp_host = $smtpServerAddress; $user = ''; $pass = ''; get_smtp_user($user, $pass); $stream = $deliver->initStream($message,$domain,0, - $smtpServerAddress, $smtpPort, $user, $pass, $authPop); + $smtpServerAddress, $smtpPort, $user, $pass, $authPop, $pop_before_smtp_host); } else { require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php'); global $sendmail_path, $sendmail_args;