Add returnpath and adjust encoding
authorJoey Schulze <joey@infodrom.org>
Sat, 19 Jan 2013 20:12:30 +0000 (21:12 +0100)
committerJoey Schulze <joey@infodrom.org>
Sat, 19 Jan 2013 20:12:30 +0000 (21:12 +0100)
lib/mail.php

index 6fa2840..f386d65 100644 (file)
@@ -14,7 +14,7 @@ function mail_attach($to, $subject, $from_mail, $from_name, $files, $message, $a
 
   $message = "--{$boundary}\n" .
     "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
-    "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";
+    "Content-Transfer-Encoding: 8bit\n\n" . $message . "\n\n";
 
   for ($i=0;$i<count($files);$i++) {
     if (is_file($files[$i])) {
@@ -31,7 +31,7 @@ function mail_attach($to, $subject, $from_mail, $from_name, $files, $message, $a
   }
 
   $message .= '--'.$boundary.'--';
-  $returnpath = "-f" . $from_mail;
+  $returnpath = "-t -f" . $from_mail;
   return mail($to, $subject, $message, $headers, $returnpath);
 }