Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
6f851065
Commit
6f851065
authored
Feb 08, 2018
by
Elias Villiger
Committed by
bbaer
Mar 01, 2018
Browse files
Feature #5318 - sendmail tokens: adjust documentation and fix some typos.
parent
4a4c08cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
6f851065
...
...
@@ -5506,10 +5506,19 @@ Column: _sendmail
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
>]
[|
A
:<
flag
autosubmit
:
on
/
off
>][|
g
:<
grId
>][|
x
:<
xId
>][|
y
:<
xId2
>][|
z
:<
xId3
>]
[|
e
:<
subject
encode
:
encode
/
decode
/
none
>][
E
:<
body
encode
:
encode
/
decode
/
none
>]
[|
C
][
d
:<
filename
of
the
attachment
>][|
F
:<
file
to
attach
>][|
u
:<
url
>][|
p
:<
T3
uri
>]
Send
text
emails
.
Every
mail
will
be
logged
in
the
table
`
mailLog
`
.
Attachments
are
supported
.
The
following
parameters
can
also
be
written
out
for
ease
of
use
:
::
to
:<
email
[,
email
]>|
from
:<
email
>|
subject
:<
subject
>|
body
:<
body
>
[|
cc
:<
email
[,
email
]]>[|
bcc
:<
email
[,
email
]]>[|
reply-to
:<
email
>]
[|
autosubmit
:<
on
/
off
>][|
grid
:<
grid
>][|
xid
:<
xId
>][|
xid2
:<
xId2
>][|
xid3
:<
xId3
>]
Send
emails
.
Every
mail
will
be
logged
in
the
table
`
mailLog
`
.
Attachments
are
supported
.
**
Syntax
**
...
...
extension/qfq/qfq/Constants.php
View file @
6f851065
...
...
@@ -1109,21 +1109,33 @@ const EXISTING_PATH_FILE_NAME = '_existingPathFileName';
//SENDMAIL
const
SENDMAIL_TOKEN_RECEIVER
=
't'
;
const
SENDMAIL_TOKEN_RECEIVER_LONG
=
'to'
;
const
SENDMAIL_TOKEN_SENDER
=
'f'
;
const
SENDMAIL_TOKEN_SENDER_LONG
=
'from'
;
const
SENDMAIL_TOKEN_SUBJECT
=
's'
;
const
SENDMAIL_TOKEN_SUBJECT_LONG
=
'subject'
;
const
SENDMAIL_TOKEN_BODY
=
'b'
;
const
SENDMAIL_TOKEN_BODY_LONG
=
'body'
;
const
SENDMAIL_TOKEN_REPLY_TO
=
'r'
;
const
SENDMAIL_TOKEN_REPLY_TO_LONG
=
'reply-to'
;
const
SENDMAIL_TOKEN_FLAG_AUTO_SUBMIT
=
'A'
;
const
SENDMAIL_TOKEN_FLAG_AUTO_SUBMIT_LONG
=
'autosubmit'
;
const
SENDMAIL_TOKEN_GR_ID
=
'g'
;
const
SENDMAIL_TOKEN_GR_ID_LONG
=
'grid'
;
const
SENDMAIL_TOKEN_X_ID
=
'x'
;
const
SENDMAIL_TOKEN_X_ID_LONG
=
'xid'
;
const
SENDMAIL_TOKEN_X_ID2
=
'y'
;
const
SENDMAIL_TOKEN_X_ID2_LONG
=
'xid2'
;
const
SENDMAIL_TOKEN_X_ID3
=
'z'
;
const
SENDMAIL_TOKEN_X_ID3_LONG
=
'xid3'
;
const
SENDMAIL_TOKEN_RECEIVER_CC
=
'c'
;
const
SENDMAIL_TOKEN_RECEIVER_CC_LONG
=
'cc'
;
const
SENDMAIL_TOKEN_RECEIVER_BCC
=
'B'
;
const
SENDMAIL_TOKEN_RECEIVER_BCC_LONG
=
'bcc'
;
const
SENDMAIL_TOKEN_ATTACHMENT
=
'attachment'
;
const
SENDMAIL_TOKEN_ATTACHMENT_FILE
=
'F'
;
const
SENDMAIL_TOKEN_ATTACHMENT_FILE_DEPRECATED
=
'a'
;
// since 5.12.17
const
SENDMAIL_TOKEN_HEADER
=
'h'
;
const
SENDMAIL_TOKEN_X_ID2
=
'y'
;
const
SENDMAIL_TOKEN_X_ID3
=
'z'
;
const
SENDMAIL_TOKEN_SUBJECT_HTML_ENTITY
=
'e'
;
const
SENDMAIL_TOKEN_BODY_HTML_ENTITY
=
'E'
;
const
SENDMAIL_TOKEN_SRC
=
'S'
;
...
...
extension/qfq/qfq/report/SendMail.php
View file @
6f851065
...
...
@@ -339,7 +339,7 @@ class SendMail {
/**
* Convert a token based sendMail string into an array.
* - Each attachment (single file or mul
i
tple concatenated files) is an array in the array.
* - Each attachment (single file or mult
i
ple concatenated files) is an array in the array.
*
* @param string $data E.g.: 't:john@doe.com|f:jane@miller.com|s:Latest|b:Dear John ...'
* @return array
...
...
@@ -364,12 +364,14 @@ class SendMail {
continue
;
}
$token
=
$line
[
0
];
if
(
strlen
(
$line
)
>
2
&&
$line
[
1
]
!=
PARAM_TOKEN_DELIMITER
)
{
$tokenAndValue
=
explode
(
PARAM_TOKEN_DELIMITER
,
$line
,
2
);
if
(
count
(
$tokenAndValue
)
<
2
)
{
throw
new
UserFormException
(
'Missing token delimiter "'
.
PARAM_TOKEN_DELIMITER
.
'" in: '
.
$line
,
ERROR_UNKNOWN_TOKEN
);
}
// speaking word tokens are all lowercase
$token
=
strlen
(
$tokenAndValue
[
0
])
>
1
?
strtolower
(
$tokenAndValue
[
0
])
:
$tokenAndValue
[
0
];
// Check for deprecated token.
if
(
$token
==
SENDMAIL_TOKEN_ATTACHMENT_FILE_DEPRECATED
)
{
throw
new
UserFormException
(
'Sendmail: Option "a:" is deprecated, please use "'
.
SENDMAIL_TOKEN_ATTACHMENT_FILE
.
'" instead'
,
ERROR_UNKNOWN_TOKEN
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment