|
From: Jirka P. <fi...@us...> - 2002-05-19 11:26:06
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv24153/phpbt/inc
Modified Files:
functions.php
Log Message:
Added check for SEND_MIME_EMAIL when sending emails.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- functions.php 17 May 2002 14:35:09 -0000 1.25
+++ functions.php 19 May 2002 11:26:04 -0000 1.26
@@ -482,7 +482,7 @@
return (trim($output));
}
-// mailer with use of quoted-printable encoding
+// mailer with use of quoted-printable encoding (if configured so)
function qp_mail($to, $subject = 'No subject', $body, $headers = '') {
global $STRING;
@@ -490,9 +490,19 @@
$headers .= "\n";
// There have to be no newline at the end of $headers
}
- $headers .= "Content-type: Text/plain; charset=\"".$STRING['lang_charset']."\"\n";
- $headers .= "Content-Transfer-Encoding: quoted-printable\nMIME-Version: 1.0";
- mail ($to, $subject, qp_enc($body), $headers);
+ $headers .= "Content-type: text/plain; charset=\"".$STRING['lang_charset']."\"\n";
+
+ // If configured to send MIME encoded emails
+ if (SEND_MIME_EMAIL) {
+ $headers .= "Content-Transfer-Encoding: quoted-printable\nMIME-Version: 1.0";
+ $retval = mail ($to, $subject, qp_enc($body), $headers);
+ } else {
+ $headers .= "Content-Transfer-Encoding: 8bit";
+ $retval = mail ($to, $subject, $body, $headers);
+ }
+
+ // Returns true if mail is eccepted for delivery, otherwise return false
+ return ($retval);
}
?>
|