autoresponder body data is passed base64 encoded
This commit is contained in:
parent
ed74e0d823
commit
ced57b2773
|
@ -66,13 +66,7 @@ class Autoresponders extends \Panel\Vmail {
|
|||
$subject = substr_replace($subject, "", -1);
|
||||
$autoresponder_array['subject'] = $subject;
|
||||
|
||||
$body = $autoresponder_array['body'];
|
||||
$body = str_replace('\n', '<br>', $body);
|
||||
$body = str_replace("\\'", "'", $body);
|
||||
$body = stripslashes($body);
|
||||
$body = substr_replace($body, "", 0, 1);
|
||||
$body = substr_replace($body, "", -1);
|
||||
$autoresponder_array['body'] = $body;
|
||||
$autoresponder_array['body'] = base64_decode($autoresponder_array['body']);;
|
||||
|
||||
$autoresponders_array[$k] = $autoresponder_array;
|
||||
|
||||
|
|
|
@ -45,11 +45,7 @@ class AutorespondersAdd extends \Panel\Vmail {
|
|||
$mbox = $f3->get('PARAMS.mbox');
|
||||
$domain = $f3->get('PARAMS.domain');
|
||||
$subject = addslashes($subject);
|
||||
$body = addslashes($body);
|
||||
$body = str_replace('\"', '\\\\\"', $body);
|
||||
$body = str_replace("\r\n", '\n', $body);
|
||||
$body = str_replace("\r", '\n', $body);
|
||||
$body = str_replace("\n", '\n', $body);
|
||||
$body = base64_encode($body);
|
||||
exec("/usr/local/bin/vmail-autoresponders-add.sh -e $mbox@$domain -u \"$subject\" -b \"$body\" -o \"$mode\" -s \"$status\"", $output, $result_code);
|
||||
if ($result_code == 0) {
|
||||
$messages[] = "Success: Autoresponder for email account $mbox@$domain added.";
|
||||
|
|
|
@ -26,13 +26,7 @@ class AutorespondersEdit extends \Panel\Vmail {
|
|||
$subject = substr_replace($subject, "", -1);
|
||||
$autoresponder_array[0]['subject'] = $subject;
|
||||
|
||||
$body = $autoresponder_array[0]['body'];
|
||||
$body = str_replace('\n', "\n", $body);
|
||||
$body = str_replace("\\'", "'", $body);
|
||||
$body = stripslashes($body);
|
||||
$body = substr_replace($body, "", 0, 1);
|
||||
$body = substr_replace($body, "", -1);
|
||||
$autoresponder_array[0]['body'] = $body;
|
||||
$autoresponder_array[0]['body'] = base64_decode($autoresponder_array[0]['body']);
|
||||
|
||||
$autoresponders_array[0] = $autoresponder_array;
|
||||
|
||||
|
@ -57,11 +51,7 @@ class AutorespondersEdit extends \Panel\Vmail {
|
|||
$f3->set('autoresponder_array', $autoresponder_array);
|
||||
extract($autoresponder_array);
|
||||
$subject = addslashes($subject);
|
||||
$body = addslashes($body);
|
||||
$body = str_replace('\"', '\\\\\"', $body);
|
||||
$body = str_replace("\r\n", '\n', $body);
|
||||
$body = str_replace("\r", '\n', $body);
|
||||
$body = str_replace("\n", '\n', $body);
|
||||
$body = base64_encode($body);
|
||||
|
||||
/* check for validation errors */
|
||||
if ($f3->exists('SESSION.messages')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user