BUG 7048 Solved question mark in email while using Russian Language
The problem was resolved sending characteres in url with base64
This commit is contained in:
@@ -367,15 +367,25 @@ class spoolRun {
|
||||
if (isset($this->config['SMTPSecure']) && preg_match('/^(ssl|tls)$/', $this->config['SMTPSecure'])) {
|
||||
$oPHPMailer->SMTPSecure = $this->config['SMTPSecure'];
|
||||
}
|
||||
|
||||
$oPHPMailer->CharSet = "UTF-8";
|
||||
$oPHPMailer->Encoding = "8bit";
|
||||
$oPHPMailer->Host = $this->config['MESS_SERVER'];
|
||||
$oPHPMailer->Port = $this->config['MESS_PORT'];
|
||||
$oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
|
||||
$oPHPMailer->Password = $this->config['MESS_PASSWORD'];
|
||||
$oPHPMailer->From = $this->fileData['from_email'];
|
||||
$oPHPMailer->FromName = utf8_decode($this->fileData['from_name']);
|
||||
$oPHPMailer->Subject = utf8_decode($this->fileData['subject']);
|
||||
$oPHPMailer->Body = utf8_decode($this->fileData['body']);
|
||||
$msSubject = $this->fileData['subject'];
|
||||
if(!(mb_detect_encoding($msSubject, "UTF-8") == "UTF-8")) {
|
||||
$msSubject = utf8_encode($msSubject);
|
||||
}
|
||||
$oPHPMailer->Subject = $msSubject;
|
||||
$msBody = $this->fileData['body'];
|
||||
if(!(mb_detect_encoding($msBody, "UTF-8") == "UTF-8")) {
|
||||
$msBody = utf8_encode($msBody);
|
||||
}
|
||||
$oPHPMailer->Body = $msBody;
|
||||
|
||||
if($this->fileData['attachments'])
|
||||
$oPHPMailer->AddAttachment($this->fileData['attachments']);
|
||||
foreach( $this->fileData['envelope_to'] as $sEmail ) {
|
||||
|
||||
@@ -468,9 +468,12 @@ try {
|
||||
default : $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
break;
|
||||
}
|
||||
$fp = fopen($sDirectory, 'w');
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
$fp = fopen($sDirectory, 'w');
|
||||
$content = stripslashes($_REQUEST['fcontent']);
|
||||
$content = str_replace("@amp@", "&", $content);
|
||||
$content = base64_decode($content);
|
||||
|
||||
fwrite($fp, $content);
|
||||
fclose($fp);
|
||||
echo 'saved: '. $sDirectory;
|
||||
|
||||
@@ -96,13 +96,17 @@ if( typofile[typofile.length-1].toLowerCase() != 'txt' && typofile[typofile.leng
|
||||
}
|
||||
|
||||
function saveFile(pro_uid, fileName){
|
||||
var fc64 = base64_encode(getField('fcontent').value);
|
||||
fc64 = fc64.replace(/&/g, "@amp@");
|
||||
fc64 = fc64.replace(/\+/g, '%2B');
|
||||
|
||||
fc = getField('fcontent').value;
|
||||
fc = escape(fc);
|
||||
fc = fc.replace(/&/g, "@amp@");
|
||||
fc = fc.replace(/\+/g, '%2B');
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : 'processes_Ajax',
|
||||
args: 'action=saveFile&filename='+fileName+'&pro_uid='+pro_uid+'&MAIN_DIRECTORY='+CURRENT_MAIN_DIRECTORY+'&fcontent='+addslashes(fc)
|
||||
args: 'action=saveFile&filename='+fileName+'&pro_uid='+pro_uid+'&MAIN_DIRECTORY='+CURRENT_MAIN_DIRECTORY+'&fcontent='+fc64
|
||||
});
|
||||
oPanel.loader.show();
|
||||
oRPC.callback = function(rpc) {
|
||||
|
||||
Reference in New Issue
Block a user