Commit ab5bfc34 authored by Elias Villiger's avatar Elias Villiger
Browse files

F6314 Add file mode M back into sendmail; rename html mode to 'mode'

parent 45f690b6
Pipeline #847 passed with stage
in 1 minute and 40 seconds
......@@ -5609,7 +5609,7 @@ Format: ::
t:<TO:email[,email]>|f:<FROM:email>|s:<subject>|b:<body>
[|c:<CC:email[,email]]>[|B:<BCC:email[,email]]>[|r:<REPLY-TO:email>]
[|A:<flag autosubmit: on/off>][|g:<grId>][|x:<xId>][|y:<xId2>][|z:<xId3>][|h:<mail header>]
[|e:<subject encode: encode/decode/none>][E:<body encode: encode/decode/none>][|M:html]
[|e:<subject encode: encode/decode/none>][E:<body encode: encode/decode/none>][|mode:html]
[|C][d:<filename of the attachment>][|F:<file to attach>][|u:<url>][|p:<T3 uri>]
The following parameters can also be written as complete words for ease of use: ::
......
......@@ -1233,7 +1233,7 @@ const SENDMAIL_TOKEN_ATTACHMENT_FILE = 'F';
const SENDMAIL_TOKEN_ATTACHMENT_FILE_DEPRECATED = 'a'; // since 5.12.17
const SENDMAIL_TOKEN_SUBJECT_HTML_ENTITY = 'e';
const SENDMAIL_TOKEN_BODY_HTML_ENTITY = 'E';
const SENDMAIL_TOKEN_BODY_MODE = 'M';
const SENDMAIL_TOKEN_BODY_MODE = 'mode';
const SENDMAIL_TOKEN_BODY_MODE_LONG = 'mode';
const SENDMAIL_TOKEN_BODY_MODE_HTML = 'html';
......
......@@ -316,14 +316,23 @@ class SendMail {
unset($attach[$key]);
break;
case SENDMAIL_TOKEN_DOWNLOAD_MODE:
$downloadMode = substr($element, 2);
unset($attach[$key]);
break;
case SENDMAIL_TOKEN_ATTACHMENT_FILE:
$downloadMode = DOWNLOAD_MODE_FILE;
if ($downloadMode == '') { // Set only if not explicitly given.
$downloadMode = DOWNLOAD_MODE_FILE;
}
break;
case SENDMAIL_TOKEN_ATTACHMENT_URL:
case SENDMAIL_TOKEN_ATTACHMENT_URL_PARAM:
case SENDMAIL_TOKEN_ATTACHMENT_PAGE:
$downloadMode = DOWNLOAD_MODE_PDF;
if ($downloadMode == '') { // Set only if not explicitly given.
$downloadMode = DOWNLOAD_MODE_PDF;
}
break;
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment