# email

Name email
Type callback
Version 1.0
Since 2020-01-01

# Prologue

Email callback is a complex tool to send emails with up-to-date process data.

# Configuration

events:

	# Event's name
	on_process_start:

		# Callback name
		email:
			config:

				# Required
				from:

					# Optional | Default is system mailing settings
					# Lattenizer
					email: john@doe.com

					# Optional | Default is system mailing settings
					# Lattenizer
					name: '{$__app->params->email->name}'

				# Required
				# One of emails or roles required
				recipients:

					# Optional | Default []
					emails: [john@black.org, bill@gates.uk]

					# Optional | Default []
					roles: [technician]

					# Optional | Default []
					# Variables that contain comma separated emails
					# Scalar variable can be used
					# Json variable can be used but path to emails must be specified
					variables: [scalarVariable, jsonVariable.emails]

				# Optional
				cc:

					# Optional | Default []
					emails: [john@wick.org]

					# Optional | Default []
					roles: [assistant]

					# Optional | Default []
					# Variables that contain comma separated emails
					# Scalar variable can be used
					# Json variable can be used but path to emails must be specified
					variables: [scalarVariable, jsonVariable.emails]

				# Optional
				bcc:

					# Optional | Default []
					emails: [joe@wick.org]

					# Optional | Default []
					roles: [@creator]

					# Optional | Default []
					# Variables that contain comma separated emails
					# Scalar variable can be used
					# Json variable can be used but path to emails must be specified
					variables: [scalarVariable, jsonVariable.emails]

				# Required
				subject: 'Amount of files uploaded: {count($files)}'

				# Required
				content: 'Good day {$customer->name}, this is email body.'

				# Optional
				attachments:

					# Optional | Default: []
					# Names of files variables that will be attached to email
					variables: [letter, invoice]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78