summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-12-06 21:37:37 +0000
committerthomascube <thomas@roundcube.net>2006-12-06 21:37:37 +0000
commitb517af4a471283adc62ef82cb30b97e896bb6799 (patch)
tree615ba4f02d3e1c3a193f7e2dfcf0d608c14aa7e3 /program/lib
parentb25766b1b3b37d31f74c8b6bf320b07107917a8d (diff)
Optimized memory usage when sending mail; Include SMTP response in log; Fixed wrong header encoding
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Mail/mime.php2
-rw-r--r--program/lib/Net/SMTP.php5
2 files changed, 4 insertions, 3 deletions
diff --git a/program/lib/Mail/mime.php b/program/lib/Mail/mime.php
index 96d7025d8..a9f798ed8 100644
--- a/program/lib/Mail/mime.php
+++ b/program/lib/Mail/mime.php
@@ -820,7 +820,7 @@ class Mail_mime
if (preg_match('#[\x80-\xFF]{1}#', $value)) {
$suffix = '';
// Don't encode e-mail address
- if (preg_match('/(.+)\s(<.+@[a-z0-9\-\.]+\.[a-z]{2,5}>)$/Ui', $value, $matches)) {
+ if (preg_match('/(.+)\s(<.+@[a-z0-9\-\.]+>)$/Ui', $value, $matches)) {
$value = $matches[1];
$suffix = ' '.$matches[2];
}
diff --git a/program/lib/Net/SMTP.php b/program/lib/Net/SMTP.php
index 4a29f4d0a..bda1494d8 100644
--- a/program/lib/Net/SMTP.php
+++ b/program/lib/Net/SMTP.php
@@ -760,7 +760,7 @@ class Net_SMTP
* @access public
* @since 1.0
*/
- function data($data)
+ function data(&$data)
{
/* RFC 1870, section 3, subsection 3 states "a value of zero
* indicates that no fixed maximum message size is in force".
@@ -784,7 +784,8 @@ class Net_SMTP
return $error;
}
- if (PEAR::isError($result = $this->_send($data . "\r\n.\r\n"))) {
+ $data .= "\r\n.\r\n";
+ if (PEAR::isError($result = $this->_send($data))) {
return $result;
}
if (PEAR::isError($error = $this->_parseResponse(250))) {