From 2c3d81dddd8d931385022a065515d6ef42d7fb7d Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 21 Jul 2009 12:31:59 +0000 Subject: - use simple rcube_smtp class - Installer: fix SMTP settings test --- program/steps/mail/func.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'program/steps/mail/func.inc') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 448663519..b969c04e9 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -19,8 +19,6 @@ */ -require_once('include/rcube_smtp.inc'); - $EMAIL_ADDRESS_PATTERN = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9][a-z0-9\-\.]*\\.[a-z]{2,5})'; // actions that do not require imap connection @@ -1326,8 +1324,12 @@ function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error) unset($message->_headers['Bcc']); // send message - $smtp_response = array(); - $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body, $smtp_response, $smtp_error); + if (!is_object($RCMAIL->smtp)) + $RCMAIL->smtp_init(true); + + $sent = $RCMAIL->smtp->send_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body); + $smtp_response = $RCMAIL->smtp->get_response(); + $smtp_error = $RCMAIL->smtp->get_error(); // log error if (!$sent) -- cgit v1.2.3