Commit 2b295e97 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Manual.rst: reformat all sql code to use the t3sphinx lexer

parent 5091176a
Pipeline #1561 passed with stage
in 2 minutes and 17 seconds
...@@ -1002,7 +1002,9 @@ Mail Log page ...@@ -1002,7 +1002,9 @@ Mail Log page
------------- -------------
For debugging purposes you may like to add a Mail Log page in the frontend. 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): :: The following QFQ code could be used for that purpose (put it in a QFQ PageContent element):
.. code-block:: mysql
# Page parameters # Page parameters
1.sql = SELECT @grId := '{{grId:C0:digit}}' AS _grId 1.sql = SELECT @grId := '{{grId:C0:digit}}' AS _grId
...@@ -1050,7 +1052,9 @@ Form Submit Log page ...@@ -1050,7 +1052,9 @@ Form Submit Log page
-------------------- --------------------
For debugging purposes you may like to add a Form Submit Log page in the frontend. 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): :: The following QFQ code could be used for that purpose (put it in a QFQ PageContent element):
.. code-block:: mysql
# Filters # Filters
20.shead = <form onchange='this.submit()' class='form-inline'><input type='hidden' name='id' value='{{pageAlias:T0}}'> 20.shead = <form onchange='this.submit()' class='form-inline'><input type='hidden' name='id' value='{{pageAlias:T0}}'>
...@@ -2554,7 +2558,9 @@ Optional it might be defined via *Form.parameter* :: ...@@ -2554,7 +2558,9 @@ Optional it might be defined via *Form.parameter* ::
Than, e.g. an action-FormElement 'afterSave' can be used to detect the final submit situation and do some extra stuff, Than, e.g. an action-FormElement 'afterSave' can be used to detect the final submit situation and do some extra stuff,
necessary for the final submit. necessary for the final submit.
The following shows the same *Form* in the `regular`, `readonly` and `requiredOff` mode:: The following shows the same *Form* in the `regular`, `readonly` and `requiredOff` mode:
.. code-block:: mysql
10.sql = SELECT CONCAT('p:{{pageAlias:T}}&form=person&r=', p.id, '|Regular') as _pagee, 10.sql = SELECT CONCAT('p:{{pageAlias:T}}&form=person&r=', p.id, '|Regular') as _pagee,
CONCAT('p:{{pageAlias:T}}&form=person&formModeGlobal=readonly&r=', p.id, '|Readonly') as _pagee, CONCAT('p:{{pageAlias:T}}&form=person&formModeGlobal=readonly&r=', p.id, '|Readonly') as _pagee,
...@@ -2828,7 +2834,9 @@ FE: 'Report' notation ...@@ -2828,7 +2834,9 @@ FE: 'Report' notation
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
The FE fields 'value' and 'note' understand the `Report`_ syntax. Nested SQL queries as well as links with SIP encoding The FE fields 'value' and 'note' understand the `Report`_ syntax. Nested SQL queries as well as links with SIP encoding
are possible. To distinguish between 'Form' and 'Report' syntax, the first line has to be `#!report` :: are possible. To distinguish between 'Form' and 'Report' syntax, the first line has to be `#!report`:
.. code-block:: mysql
#!report #!report
...@@ -4503,7 +4511,9 @@ If *showDebugInfo* is enabled, a full stacktrace and variable contents are displ ...@@ -4503,7 +4511,9 @@ If *showDebugInfo* is enabled, a full stacktrace and variable contents are displ
Form search Form search
^^^^^^^^^^^ ^^^^^^^^^^^
QFQ content record:: QFQ content record:
.. code-block:: mysql
# Creates a small form that redirects back to this page # Creates a small form that redirects back to this page
10 { 10 {
...@@ -4683,7 +4693,7 @@ Chart ...@@ -4683,7 +4693,7 @@ Chart
* Don't nest the HTML & JavaScript code - bad workaround, this is not human readable. * Don't nest the HTML & JavaScript code - bad workaround, this is not human readable.
* Select different nesting token, e.g. '<' (check the first line on the following example). * Select different nesting token, e.g. '<' (check the first line on the following example).
:: .. code-block:: mysql
# < # <
...@@ -4925,9 +4935,7 @@ Table: Person ...@@ -4925,9 +4935,7 @@ Table: Person
* Type: text * Type: text
* Label: Name * Label: Name
* Parameter:: * Parameter: ``typeAheadSql = SELECT name FROM Person WHERE name LIKE ? OR firstName LIKE ? LIMIT 100``
typeAheadSql = SELECT name FROM Person WHERE name LIKE ? OR firstName LIKE ? LIMIT 100
Typeahead: LDAP with additional values Typeahead: LDAP with additional values
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -5038,7 +5046,8 @@ A simple example ...@@ -5038,7 +5046,8 @@ A simple example
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
Assume that the database has a table person with columns firstName and lastName. To create a simple list of all persons, we can do the following: Assume that the database has a table person with columns firstName and lastName. To create a simple list of all persons, we can do the following:
::
.. code-block:: mysql
10.sql = SELECT id AS pId, CONCAT(firstName, " ", lastName, " ") AS name FROM person 10.sql = SELECT id AS pId, CONCAT(firstName, " ", lastName, " ") AS name FROM person
...@@ -5046,29 +5055,25 @@ The '10' indicates a *root level* of the report (see section `Structure`_). The ...@@ -5046,29 +5055,25 @@ The '10' indicates a *root level* of the report (see section `Structure`_). The
for the specific level. When the query is executed, it will return a result having one single column name containing first and last name for the specific level. When the query is executed, it will return a result having one single column name containing first and last name
separated by a space character. separated by a space character.
The HTML output, displayed on the page, resulting from only this definition, could look as follows: The HTML output, displayed on the page, resulting from only this definition, could look as follows::
::
John DoeJane MillerFrank Star John DoeJane MillerFrank Star
..
I.e., QFQ will simply output the content of the SQL result row after row for each single level. I.e., QFQ will simply output the content of the SQL result row after row for each single level.
However, we can modify (wrap) the output by setting the values of various keys for each level: 10.rsep=<br/> for example However, we can modify (wrap) the output by setting the values of various keys for each level: 10.rsep=<br/> for example
tells QFQ to separate the rows of the result by a HTML-line break. The final result in this case is: tells QFQ to separate the rows of the result by a HTML-line break. The final result in this case is:
:: .. code-block:: mysql
10.sql = SELECT id AS personId, CONCAT(firstName, " ", lastName, " ") AS name FROM person 10.sql = SELECT id AS personId, CONCAT(firstName, " ", lastName, " ") AS name FROM person
10.rsep = <br> 10.rsep = <br>
HTML output: HTML output::
::
John Doe<br>Jane Miller<br>Frank Star John Doe<br>Jane Miller<br>Frank Star
..
.. _`syntax-of-report`: .. _`syntax-of-report`:
...@@ -5167,7 +5172,7 @@ of person records from your person table, you can use the SQL query on the secon ...@@ -5167,7 +5172,7 @@ of person records from your person table, you can use the SQL query on the secon
See the example below: See the example below:
:: .. code-block:: mysql
10.sql = SELECT id AS _pId, CONCAT(firstName, " ", lastName, " ") AS name FROM person 10.sql = SELECT id AS _pId, CONCAT(firstName, " ", lastName, " ") AS name FROM person
10.rsep = <br> 10.rsep = <br>
...@@ -5176,17 +5181,13 @@ See the example below: ...@@ -5176,17 +5181,13 @@ See the example below:
10.10.rbeg = ( 10.10.rbeg = (
10.10.rend = ) 10.10.rend = )
..
This would result in This would result in::
::
John Doe (3004 Bern) John Doe (3004 Bern)
Jane Miller (8008 Zürich) Jane Miller (8008 Zürich)
Frank Star (3012 Bern) Frank Star (3012 Bern)
..
Text across several lines Text across several lines
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -5199,7 +5200,9 @@ be appended to the last keyword line. 'Keyword' lines are detected on: ...@@ -5199,7 +5200,9 @@ be appended to the last keyword line. 'Keyword' lines are detected on:
* { * {
* <level>[.<sub level] { * <level>[.<sub level] {
Example:: Example:
.. code-block:: mysql
10.sql = SELECT 'hello world' 10.sql = SELECT 'hello world'
FROM mastertable FROM mastertable
...@@ -5218,10 +5221,12 @@ Join mode: SQL ...@@ -5218,10 +5221,12 @@ Join mode: SQL
This is the default. All lines are joined with a *space* in between. E.g.: :: This is the default. All lines are joined with a *space* in between. E.g.: ::
.. code-block:: mysql
10.sql = SELECT 'hello world' 10.sql = SELECT 'hello world'
FROM mastertable FROM mastertable
Results to: `10.sql = SELECT 'hello world' FROM mastertable` Results to: ``10.sql = SELECT 'hello world' FROM mastertable``
Notice the space between "...world'" and "FROM ...". Notice the space between "...world'" and "FROM ...".
...@@ -5229,17 +5234,21 @@ Join mode: strip whitespace ...@@ -5229,17 +5234,21 @@ Join mode: strip whitespace
''''''''''''''''''''''''''' '''''''''''''''''''''''''''
Ending a line with a '\\' strips all leading and trailing whitespaces of that line joins the line directly (no extra Ending a line with a '\\' strips all leading and trailing whitespaces of that line joins the line directly (no extra
space in between). E.g.: :: space in between). E.g.:
.. code-block:: mysql
10.sql = SELECT 'hello world', 'd:final.pdf \ 10.sql = SELECT 'hello world', 'd:final.pdf \
|p:id=export \ |p:id=export \
|t:Download' AS _pdf \ |t:Download' AS _pdf \
Results to: `10.sql = SELECT 'hello world', 'd:final.pdf|p:id=export|t:Download' AS _pdf` Results to: ``10.sql = SELECT 'hello world', 'd:final.pdf|p:id=export|t:Download' AS _pdf``
Note: the '\\' does not force the joining, it only removes the whitespaces. Note: the '\\' does not force the joining, it only removes the whitespaces.
To get the same result, the following is also possible: :: To get the same result, the following is also possible:
.. code-block:: mysql
10.sql = SELECT 'hello world', CONCAT('d:final.pdf' 10.sql = SELECT 'hello world', CONCAT('d:final.pdf'
'|p:id=export', '|p:id=export',
...@@ -5248,7 +5257,9 @@ To get the same result, the following is also possible: :: ...@@ -5248,7 +5257,9 @@ To get the same result, the following is also possible: ::
Nesting of levels Nesting of levels
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Levels can be nested. E.g.: :: Levels can be nested. E.g.:
.. code-block:: mysql
10 { 10 {
sql = SELECT ... sql = SELECT ...
...@@ -5258,7 +5269,9 @@ Levels can be nested. E.g.: :: ...@@ -5258,7 +5269,9 @@ Levels can be nested. E.g.: ::
} }
} }
This is equal to: :: This is equal to:
.. code-block:: mysql
10.sql = SELECT ... 10.sql = SELECT ...
10.5.sql = SELECT ... 10.5.sql = SELECT ...
...@@ -5268,7 +5281,9 @@ Leading / trailing spaces ...@@ -5268,7 +5281,9 @@ Leading / trailing spaces
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
By default, leading or trailing whitespaces are removed from strings behind '='. E.g. 'rend = test ' becomes 'test' for By default, leading or trailing whitespaces are removed from strings behind '='. E.g. 'rend = test ' becomes 'test' for
rend. To prevent any leading or trailing spaces, surround them by using single or double ticks. Example: :: rend. To prevent any leading or trailing spaces, surround them by using single or double ticks. Example:
.. code-block:: mysql
10.sql = SELECT name FROM Person 10.sql = SELECT name FROM Person
10.rsep = ' ' 10.rsep = ' '
...@@ -5280,7 +5295,9 @@ Braces character for nesting ...@@ -5280,7 +5295,9 @@ Braces character for nesting
By default, curly braces '{}' are used for nesting. Alternatively angle braces '<>', round braces '()' or square By default, curly braces '{}' are used for nesting. Alternatively angle braces '<>', round braces '()' or square
braces '[]' are also possible. To define the braces to use, the **first line** of the bodytext has to be a comment line and the braces '[]' are also possible. To define the braces to use, the **first line** of the bodytext has to be a comment line and the
last character of that line must be one of '{[(<'. The corresponding braces are used for that QFQ record. E.g.: :: last character of that line must be one of '{[(<'. The corresponding braces are used for that QFQ record. E.g.:
.. code-block:: mysql
# Specific code. > # Specific code. >
10 < 10 <
...@@ -5300,7 +5317,9 @@ Per QFQ tt-content record, only one type of nesting braces can be used. ...@@ -5300,7 +5317,9 @@ Per QFQ tt-content record, only one type of nesting braces can be used.
Be careful to: Be careful to:
* write nothing else than whitespaces/newline behind an **open brace** * write nothing else than whitespaces/newline behind an **open brace**
* the **closing brace** has to be alone on a line. :: * the **closing brace** has to be alone on a line:
.. code-block:: mysql
10.sql = SELECT 'Yearly Report' 10.sql = SELECT 'Yearly Report'
...@@ -5343,7 +5362,9 @@ The STORE_RECORD will always be merged with previous content. The Level Keys are ...@@ -5343,7 +5362,9 @@ The STORE_RECORD will always be merged with previous content. The Level Keys are
Multiple columns, with the same column name, can't be accessed individually. Only the last column is available. Multiple columns, with the same column name, can't be accessed individually. Only the last column is available.
Retrieving the *final* value of `special-column-names`_ is possible via '{{&<column>:R}}. Example: :: Retrieving the *final* value of `special-column-names`_ is possible via '{{&<column>:R}}. Example:
.. code-block:: mysql
10.sql = SELECT 'p:home&form=Person|s|b:success|t:Edit' AS _link 10.sql = SELECT 'p:home&form=Person|s|b:success|t:Edit' AS _link
10.20.sql = SELECT '{{link:R}}', '{{&link:R}}' 10.20.sql = SELECT '{{link:R}}', '{{&link:R}}'
...@@ -5351,7 +5372,9 @@ Retrieving the *final* value of `special-column-names`_ is possible via '{{&<col ...@@ -5351,7 +5372,9 @@ Retrieving the *final* value of `special-column-names`_ is possible via '{{&<col
The first column of row `10.20` returns 'p:home&form=Person|s|b:success|t:Edit',the second column returns The first column of row `10.20` returns 'p:home&form=Person|s|b:success|t:Edit',the second column returns
'<span class="btn btn-success"><a href="?home&s=badcaffee1234">Edit</a></span>'. '<span class="btn btn-success"><a href="?home&s=badcaffee1234">Edit</a></span>'.
Example STORE_RECORD: :: Example STORE_RECORD:
.. code-block:: mysql
10.sql= SELECT p.id AS _pId, p.name FROM Person AS p 10.sql= SELECT p.id AS _pId, p.name FROM Person AS p
10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{pId:R}} 10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{pId:R}}
...@@ -5362,7 +5385,9 @@ The line '10.10' will output 'dummy' in cases where there is at least one corres ...@@ -5362,7 +5385,9 @@ The line '10.10' will output 'dummy' in cases where there is at least one corres
If there are no addresses (all persons) it reports the person id. If there are no addresses (all persons) it reports the person id.
If there is at least one address, it reports 'dummy', cause that's the last stored content. If there is at least one address, it reports 'dummy', cause that's the last stored content.
Example 'level': :: Example 'level':
.. code-block:: mysql
10.sql= SELECT p.id AS _pId, p.name FROM Person AS p 10.sql= SELECT p.id AS _pId, p.name FROM Person AS p
10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{10.pId}} 10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{10.pId}}
...@@ -5388,7 +5413,9 @@ Notes to the level: ...@@ -5388,7 +5413,9 @@ Notes to the level:
| | *30.5.1* will be executed as many times as *30.5* has row numbers. | | | *30.5.1* will be executed as many times as *30.5* has row numbers. |
+-------------+------------------------------------------------------------------------------------------------------------------------+ +-------------+------------------------------------------------------------------------------------------------------------------------+
Report Example 1: :: Report Example 1:
.. code-block:: mysql
# Displays current date # Displays current date
10.sql = SELECT CURDATE() 10.sql = SELECT CURDATE()
...@@ -5607,7 +5634,7 @@ render mode might dynamically control the rendered link. ...@@ -5607,7 +5634,7 @@ render mode might dynamically control the rendered link.
|7 | pure url |pure url | |no link, pure url | |7 | pure url |pure url | |no link, pure url |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+ +------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
:: .. code-block:: mysql
10.sql = SELECT CONCAT('u:', p.homepage, IF(p.showHomepage='yes', '|r:0', '|r:5') ) AS _link FROM Person AS p 10.sql = SELECT CONCAT('u:', p.homepage, IF(p.showHomepage='yes', '|r:0', '|r:5') ) AS _link FROM Person AS p
...@@ -5724,7 +5751,7 @@ The colum name is composed of the string *page* and a trailing character to spec ...@@ -5724,7 +5751,7 @@ The colum name is composed of the string *page* and a trailing character to spec
**Syntax** **Syntax**
:: .. code-block:: mysql
10.sql = SELECT "[options]" AS _page[<link type>] 10.sql = SELECT "[options]" AS _page[<link type>]
...@@ -5732,7 +5759,7 @@ The colum name is composed of the string *page* and a trailing character to spec ...@@ -5732,7 +5759,7 @@ The colum name is composed of the string *page* and a trailing character to spec
<link type> = c,d,e,h,i,n,s <link type> = c,d,e,h,i,n,s
..
+---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+ +---------------+-----------------------------------------------+-------------------------------------+----------------------------------------------+
| column name | Purpose |default value of question parameter | Mandatory parameters | | column name | Purpose |default value of question parameter | Mandatory parameters |
...@@ -5792,7 +5819,7 @@ These column offers a link, with a confirmation question, to delete one record ( ...@@ -5792,7 +5819,7 @@ These column offers a link, with a confirmation question, to delete one record (
**Syntax** **Syntax**
:: .. code-block:: mysql
10.sql = SELECT "U:table=<tablename>&r=<record id>|q:<question>|..." AS _paged 10.sql = SELECT "U:table=<tablename>&r=<record id>|q:<question>|..." AS _paged
10.sql = SELECT "U:form=<formname>&r=<record id>|q:<question>|..." AS _paged 10.sql = SELECT "U:form=<formname>&r=<record id>|q:<question>|..." AS _paged
...@@ -5824,7 +5851,7 @@ Additional action *FormElement* of type *beforeDelete* or *afterDelete* will be ...@@ -5824,7 +5851,7 @@ Additional action *FormElement* of type *beforeDelete* or *afterDelete* will be
Examples: Examples:
''''''''' '''''''''
:: .. code-block:: mysql
10.sql = SELECT 'U:table=Person&r=123|q:Do you want delete John Doe?' AS _paged 10.sql = SELECT 'U:table=Person&r=123|q:Do you want delete John Doe?' AS _paged
10.sql = SELECT 'U:form=person-main&r=123|q:Do you want delete John Doe?' AS _paged 10.sql = SELECT 'U:form=person-main&r=123|q:Do you want delete John Doe?' AS _paged
...@@ -5864,7 +5891,7 @@ Render text vertically. This is useful for tables with limited column width. The ...@@ -5864,7 +5891,7 @@ Render text vertically. This is useful for tables with limited column width. The
**Syntax** **Syntax**
:: .. code-block:: mysql
10.sql = SELECT "<text>|[<angle>]" AS _vertical 10.sql = SELECT "<text>|[<angle>]" AS _vertical
...@@ -5883,7 +5910,7 @@ This works best for angles close to 270 or 90. ...@@ -5883,7 +5910,7 @@ This works best for angles close to 270 or 90.
**Minimal Example** **Minimal Example**
:: .. code-block:: mysql
10.sql = SELECT "Hallo" AS _vertical 10.sql = SELECT "Hallo" AS _vertical
...@@ -5901,7 +5928,7 @@ Easily create Email links. ...@@ -5901,7 +5928,7 @@ Easily create Email links.
**Syntax** **Syntax**
:: .. code-block:: mysql
10.sql = SELECT "<email address>|[<link text>]" AS _mailto 10.sql = SELECT "<email address>|[<link text>]" AS _mailto
...@@ -5924,30 +5951,25 @@ Easily create Email links. ...@@ -5924,30 +5951,25 @@ Easily create Email links.
**Minimal Example** **Minimal Example**
:: .. code-block:: mysql
10.sql = SELECT "john.doe@example.com" AS _mailto 10.sql = SELECT "john.doe@example.com" AS _mailto
..
**Advanced Example** **Advanced Example**
:: .. code-block:: mysql
10.sql = SELECT "john.doe@example.com|John Doe" AS _mailto 10.sql = SELECT "john.doe@example.com|John Doe" AS _mailto
..
.. _column_sendmail: .. _column_sendmail:
Column: _sendmail Column: _sendmail
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Format: :: Format::
t:<TO:email[,email]>|f:<FROM:email>|s:<subject>|b:<body> t:<TO:email[,email]>|f:<FROM:email>|s:<subject>|b:<body>
[|c:<CC:email[,email]]>[|B:<BCC:email[,email]]>[|r:<REPLY-TO:email>] [|c:<CC:email[,email]]>[|B:<BCC:email[,email]]>[|r:<REPLY-TO:email>]
...@@ -5955,7 +5977,7 @@ Format: :: ...@@ -5955,7 +5977,7 @@ Format: ::
[|e:<subject encode: encode/decode/none>][E:<body encode: encode/decode/none>][|mode: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>] [|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: :: The following parameters can also be written as complete words for ease of use::
to:<email[,email]>|from:<email>|subject:<subject>|body:<body> to:<email[,email]>|from:<email>|subject:<subject>|body:<body>
[|cc:<email[,email]]>[|bcc:<email[,email]]>[|reply-to:<email>] [|cc:<email[,email]]>[|bcc:<email[,email]]>[|reply-to:<email>]
...@@ -5966,7 +5988,7 @@ Send emails. Every mail will be logged in the table `mailLog`. Attachments are s ...@@ -5966,7 +5988,7 @@ Send emails. Every mail will be logged in the table `mailLog`. Attachments are s
**Syntax** **Syntax**
:: .. code-block:: mysql
10.sql = SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow" AS _sendmail 10.sql = SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow" AS _sendmail
10.sql = SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow|A:off|g:1|x:2|y:3|z:4" AS _sendmail 10.sql = SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow|A:off|g:1|x:2|y:3|z:4" AS _sendmail
...@@ -6041,23 +6063,19 @@ Send emails. Every mail will be logged in the table `mailLog`. Attachments are s ...@@ -6041,23 +6063,19 @@ Send emails. Every mail will be logged in the table `mailLog`. Attachments are s
**Minimal Example** **Minimal Example**
:: .. code-block:: mysql
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available." AS _sendmail 10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available." AS _sendmail
..
This will send an email with subject *Latest News* from company@example.com to john.doe@example.com. This will send an email with subject *Latest News* from company@example.com to john.doe@example.com.
**Advanced Examples** **Advanced Examples**
:: .. code-block:: mysql
10.sql = SELECT "t:customer1@example.com,Firstname Lastname <customer2@example.com>, Firstname Lastname <customer3@example.com>| \\ 10.sql = SELECT "t:customer1@example.com,Firstname Lastname <customer2@example.com>, Firstname Lastname <customer3@example.com>| \\
f:company@example.com|s:Latest News|b:The new version is now available.|r:sales@example.com|A:on|g:101|x:222|c:ceo@example.com|B:backup@example.com" AS _sendmail f:company@example.com|s:Latest News|b:The new version is now available.|r:sales@example.com|A:on|g:101|x:222|c:ceo@example.com|B:backup@example.com" AS _sendmail
..
This will send an email with subject *Latest News* from company@example.com to customer1, customer2 and customer3 by This will send an email with subject *Latest News* from company@example.com to customer1, customer2 and customer3 by
using a realname for customer2 and customer3 and suppress generating of OoO answer if any receiver is on vacation. using a realname for customer2 and customer3 and suppress generating of OoO answer if any receiver is on vacation.
Additional the CEO as well as backup will receive the mail via CC and BCC. Additional the CEO as well as backup will receive the mail via CC and BCC.
...@@ -6099,7 +6117,9 @@ Any combination (incl. repeating them) are possible. Any source will be added as ...@@ -6099,7 +6117,9 @@ Any combination (incl. repeating them) are possible. Any source will be added as
Optional any number of sources can be concatenated to a single PDF file: 'C|F:<file1>|F:<file2>|p:export&a=123'. Optional any number of sources can be concatenated to a single PDF file: 'C|F:<file1>|F:<file2>|p:export&a=123'.
Examples in Report:: Examples in Report:
.. code-block:: mysql