summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-01 03:55:40 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-01 03:55:40 +0000
commitd49484c9a65681f0ee41490c098a0b4d7a938c0e (patch)
treec161b6d650f7ac1bb5440cd92c75d511dd296ba0 /core
parent7ef2dae07029ee7e9657ef3bf5122097e02a8886 (diff)
Update the handling of the to field if the input field is an array
Diffstat (limited to 'core')
-rw-r--r--core/config/sendmail.php4
-rw-r--r--core/libraries/Sendmail.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/config/sendmail.php b/core/config/sendmail.php
index ac1bdb1a..5da84abf 100644
--- a/core/config/sendmail.php
+++ b/core/config/sendmail.php
@@ -20,9 +20,9 @@
/**
* PHP Mail Configuration parameters
* from => email address that appears as the from address
- * line-length => word wrap length
+ * line-length => word wrap length (PHP documentations suggest no larger tha 70 characters
* reply-to => what goes into the reply to header
*/
$config["from"] = "admin@gallery3.com";
-$config["line_length"] = 75;
+$config["line_length"] = 70;
$config["reply_to"] = "public@gallery3.com";
diff --git a/core/libraries/Sendmail.php b/core/libraries/Sendmail.php
index 27efb1fd..3da641ed 100644
--- a/core/libraries/Sendmail.php
+++ b/core/libraries/Sendmail.php
@@ -55,7 +55,7 @@ class Sendmail_Core {
public function __call($key, $value) {
switch ($key) {
case "to":
- $this->to = is_array($value) ? $value : array($value);
+ $this->to = is_array($value[0]) ? $value[0] : array($value[0]);
break;
case "header":
if (count($value) != 2) {
@@ -86,7 +86,7 @@ class Sendmail_Core {
$headers[] = "$key: $value";
}
$headers = implode("\r\n", $headers);
- $message = wordwrap($this->message, $this->line_length, "\r\n");
+ $message = wordwrap($this->message, $this->line_length, "\n");
if (!TEST_MODE) {
if (!mail($to, $this->subject, $this->message, $headers)) {