| program/include/rcube_smtp.php |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland |
+ | Copyright (C) 2005-2010, The Roundcube Dev Team |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
- $Id: rcube_smtp.php 4666 2011-04-17 09:34:02Z alec $
+ $Id: rcube_smtp.php 5499 2011-11-28 09:03:27Z alec $
*/
if ($opts['dsn']) {
$exts = $this->conn->getServiceExtensions();
- if (!isset($exts['DSN'])) {
- $this->error = array('label' => 'smtpdsnerror');
- $this->response[] = "DSN not supported";
- return false;
+ if (isset($exts['DSN'])) {
+ $from_params = 'RET=HDRS';
+ $recipient_params = 'NOTIFY=SUCCESS,FAILURE';
}
-
- $from_params = 'RET=HDRS';
- $recipient_params = 'NOTIFY=SUCCESS,FAILURE';
}
// RFC2298.3: remove envelope sender address
$from = $addresses[0];
// Reject envelope From: addresses with spaces.
- if (strstr($from, ' '))
+ if (strpos($from, ' ') !== false)
return false;
$lines[] = $key . ': ' . $value;
// if we're passed an array, assume addresses are valid and implode them before parsing.
if (is_array($recipients))
$recipients = implode(', ', $recipients);
-
+
$addresses = array();
$recipients = rcube_explode_quoted_string(',', $recipients);
reset($recipients);
while (list($k, $recipient) = each($recipients))
{
- $a = explode(" ", $recipient);
+ $a = rcube_explode_quoted_string(' ', $recipient);
while (list($k2, $word) = each($a))
{
if (strpos($word, "@") > 0 && $word[strlen($word)-1] != '"')
}
}
}
+
return $addresses;
}