Hide last authors
Maurice Gasco 3.2 1 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
2 Api to send emails or SMS using a notification template. Notification templates can be defined in Administration tab, "Workflows and Notifications" menu and "Notifications Templates" menu
3
4 (% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
5 == (% style="font-size: 22.54px; background-color: rgb(245, 245, 245);" %)Functions(%%) ==
6
7 (% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
8 === (% style="font-size: 20.44px;" %)init(template)(%%) ===
9
10 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
11 Init the notification with the template. template in an Entity object.
12
13 (% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
14 === (% style="font-size: 20.44px;" %)setFrom(email, title)(%%) ===
15
16 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
17 Set the sender informations.
18
19
20 * (% style="font-size: 14px; text-align: start; background-color: rgb(245, 245, 245);" %)email is a string representing the email address of the sender.
21 * (% style="font-size: 14px; text-align: start; background-color: rgb(245, 245, 245);" %)title is a string representing his name.
22
23 (% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
24 === (% style="font-size: 20.44px;" %)setReplyTo(email, title)(%%) ===
25
26 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
27 Set the "reply to" informations.
28
29
30 * (% style="font-size: 14px; text-align: start; background-color: rgb(245, 245, 245);" %)email is a string representing the email address of the sender.
31 * (% style="font-size: 14px; text-align: start; background-color: rgb(245, 245, 245);" %)title is a string representing his name.
32
33 (% style="font-family: sans-serif; font-style: normal; text-align: start;" %)
34 === (% style="font-size: 20.44px;" %)setTo(recipient, group)(%%) ===
35
36 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
37 Set the recipient informations
38
39 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
40 * recipient is either :
41 ** a string representing an email address
42 ** an Entity object representing a User or a Group
43 ** an Array of Entity objects of Users or Groups
44 * group is an Entity object representing a group used for delegation
45
46
47 (% style="font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; line-height: 19.6px;" %)
48
49 example:
50 {{code language="javascript"}}var result = amount1.Multiply(taxrate);{{/code}}
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation