Project

General

Profile

Feature #14780 » class.t3lib_htmlmail.diff.txt

Administrator Admin, 2005-05-31 21:46

 
--- o\class.t3lib_htmlmail.php 2005-05-23 02:41:10.000000000 +0200
+++ c\class.t3lib_htmlmail.php 2005-05-30 17:32:32.000000000 +0200
@@ -236,9 +236,10 @@
var $image_fullpath_list = "";
var $href_fullpath_list = "";
- var $plain_text_header = "Content-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: quoted-printable";
+ var $plain_text_header = "Content-Type: text/plain; charset=\nContent-Transfer-Encoding: quoted-printable";
var $html_text_header = "Content-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: quoted-printable";
+ /* by bednee */ var $charset = 'iso-8859-1';
@@ -254,6 +255,10 @@
*/
function t3lib_htmlmail () {
$this->forceReturnPath = $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableReturnPath'];
+ /* by bednee */ if (!empty($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']))
+ /* by bednee */ $this->charset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];
+ /* by bednee */ $this->plain_text_header = "Content-Type: text/plain; charset=".$this->charset."\nContent-Transfer-Encoding: quoted-printable";
+ /* by bednee */ $this->html_text_header = "Content-Type: text/html; charset=".$this->charset."\nContent-Transfer-Encoding: quoted-printable";
}
/**
@@ -271,8 +276,8 @@
* @return [type] ...
*/
function useBase64() {
- $this->plain_text_header = 'Content-Type: text/plain; charset=iso-8859-1'.chr(10).'Content-Transfer-Encoding: base64';
- $this->html_text_header = 'Content-Type: text/html; charset=iso-8859-1'.chr(10).'Content-Transfer-Encoding: base64';
+ /* by bednee */ $this->plain_text_header = 'Content-Type: text/plain; charset='.$this->charset.chr(10).'Content-Transfer-Encoding: base64';
+ /* by bednee */ $this->html_text_header = 'Content-Type: text/html; charset='.$this->charset.chr(10).'Content-Transfer-Encoding: base64';
$this->alt_base64=1;
}
@@ -762,7 +767,7 @@
*/
function preview() {
echo nl2br(HTMLSpecialChars($this->headers));
- echo "<BR>";
+ /* by bednee */ echo "<br />";
echo nl2br(HTMLSpecialChars($this->message));
}
@@ -1375,7 +1380,7 @@
*/
function convertName($name) {
if (ereg("[^".chr(32)."-".chr(60).chr(62)."-".chr(127)."]",$name)) {
- return '=?iso-8859-1?B?'.base64_encode($name).'?=';
+ /* by bednee */ return '=?'.$this->charset.'?B?'.base64_encode($name).'?=';
} else {
return $name;
}
(1-1/2)