` or absolute (starting with '/').
.. _`mail-log-page`:
Mail Log page (Table MailLog)
-----------------------------
For debugging purposes you may like to add a Mail Log page in the frontend.
The following QFQ code could be used for that purpose (put it in a QFQ PageContent element)
Note: If you do not use/have the Ggroup table, then remove the "# Filters" block.
::
# Page parameters
1.sql = SELECT @grId := '{{grId:C0:digit}}' AS _grId
2.sql = SELECT @summary := IF('{{summary:CE:alnumx}}' = 'true', 'true', 'false') AS _s
# Filters
10 {
sql = SELECT "'", gr.id, IF(gr.id = @grId, "' selected>", "'>"), gr.value, ' (Id: ', gr.id, ')'
FROM Ggroup AS gr
INNER JOIN MailLog AS ml ON ml.grId = gr.id
GROUP BY gr.id
head =
}
# Mail Log
50 {
sql = SELECT id, '', grId, ' | ', xId, ' | '
, REPLACE(receiver, ',', ' '), ' | ', REPLACE(sender, ',', ' '), ' | '
, DATE_FORMAT(modified, '%d.%m.%Y %H:%i:%s'), ' | '
, CONCAT('', subject, ' ', IF(@summary = 'true', CONCAT(SUBSTR(body, 1
, LEAST(IF(INSTR(body, '\n') = 0, 50, INSTR(body, '\n')), IF(INSTR(body, ' ') = 0, 50
, INSTR(body, ' ')))-1), ' ...'), CONCAT(' ', REPLACE(body, '\n', ' '))) )
FROM MailLog
WHERE (grId = @grId OR @grId = 0)
ORDER BY modified DESC
LIMIT 100
head =
Id | grId | xId | To | From | Date | E-Mail |
tail =
rbeg = |
rend = |
}
.. _REDIRECT_ALL_MAIL_TO:
Redirect all mail to (catch all)
--------------------------------
Setup in :ref:`configuration`
* *redirectAllMailTo=john@doe.com*
* During the development, it might be helpful to configure a 'catch all' email address, which QFQ uses as the final receiver
instead of the original intended one.
* The setting will:
* Replace the 'To' with the configured one.
* Clear 'CC' and 'Bcc'
* Write a note and the original configured receiver at the top of the email body.
Show log files realtime
-----------------------
Display QFQ log files in realtime.
The following QFQ code could be used for that purpose (put it in a QFQ PageContent element)::
#
# {{logfile:SU}}
#
# Show buttons to select log file.
10 {
sql = SELECT '{{logfile:SU:::sql.log}}' AS '_=logfile'
head =
tail =
20.sql = SELECT CONCAT('p:{{pageAlias:T}}&logfile=sql.log|t:sql.log|b:', IF('{{logfile:R}}'='sql.log','primary','')) AS _page, ' '
, CONCAT('p:{{pageAlias:T}}&logfile=qfq.log|t:qfq.log|b:', IF('{{logfile:R}}'='qfq.log','primary','')) AS _page, ' '
, CONCAT('p:{{pageAlias:T}}&logfile=mail.log|t:mail.log|b:', IF('{{logfile:R}}'='mail.log','primary','')) AS _page
}
# Show selected log file.
100 {
sql = SELECT 'file:fileadmin/protected/log/{{logfile:R}}' AS _monitor
head = Please wait
}
.. _`form-submit-log-page`:
Form Submit Log page
--------------------
For debugging purposes you may like to add a Form Submit Log page in the frontend.
The following QFQ code could be used for that purpose (put it in a QFQ PageContent element)::
# Filters
20.shead =