Skip to content

Commit 4b17f9b

Browse files
committed
Add test case
1 parent 98ec845 commit 4b17f9b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/sections/tasks/email.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,25 @@ For some like to/cc you can even define multiple emails:
4646
```
4747
Note that this needs an additional array nesting in this case.
4848

49+
You can add helpers using `helper` (single) or `helpers` (multiple) keys inside settings:
50+
```php
51+
$data = [
52+
'settings' => [
53+
...
54+
'helpers' => [['Shim.Configure']],
55+
],
56+
...
57+
];
58+
```
59+
4960
You can also assemble a Mailer object manually and pass that along as settings directly:
5061
```php
5162
$data = [
5263
'settings' => $mailerObject,
5364
'content' => $content,
5465
];
5566
```
67+
Deprecated: This is not recommended as it breaks as soon as the code changes.
5668

5769
Or send reusable Emails via the Mailer object:
5870
```php
@@ -62,6 +74,7 @@ $data = [
6274
'vars' => [$var1, $var2, $var3]
6375
];
6476
```
77+
Deprecated: This is not recommended as it breaks as soon as the code changes.
6578

6679
Inside a controller you can for example do this for your mailers:
6780
```php

tests/TestCase/Queue/Task/EmailTaskTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public function testRunArrayEmailComplex() {
111111
'[email protected]' => 'Your Other Name',
112112
],
113113
],
114+
'helpers' => [['Shim.Configure']],
114115
];
115116

116117
$data = [

0 commit comments

Comments
 (0)