summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-21 12:31:59 +0000
committeralecpl <alec@alec.pl>2009-07-21 12:31:59 +0000
commit2c3d81dddd8d931385022a065515d6ef42d7fb7d (patch)
tree6593a8c50717d578bb67590b27dba819f1acf5a8 /program/steps/mail
parenta07ab6da091e8a476b04eec5f7e1807599cdd278 (diff)
- use simple rcube_smtp class
- Installer: fix SMTP settings test
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc10
1 files changed, 6 insertions, 4 deletions
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)