You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the `name` column will be used to set the recipient's name. If you wish to use another column, you should implement the `preferredEmailName` method in your model.
By default, the `email` column will be used to set the recipient's e-mail address. If you wish to use another column, you should implement the `preferredEmailAddress` method in your model.
By default, the app locale will be used to set the recipient's locale. If you wish to use another column, you should implement the `preferredEmailLocale` method in your model.
Note: `fromData()` and `fromStorage()` are not supported as the work with raw data.
189
+
</small>
178
190
179
191
### Scheduling
180
192
@@ -189,27 +201,6 @@ Email::compose()
189
201
->later('+2 hours');
190
202
```
191
203
192
-
### Encryption (Optional)
193
-
194
-
If you wish to encrypt your e-mails, please enable the `encrypt` option in the configuration file. This is disabled by default. Encryption and decryption will be handled by Laravel's built-in encryption mechanism. Please note that by encrypting the e-mail it takes more disk space.
195
-
196
-
```text
197
-
Without encryption
198
-
199
-
7 bytes (label)
200
-
16 bytes (recipient)
201
-
20 bytes (subject)
202
-
48 bytes (view name)
203
-
116 bytes (variables)
204
-
1874 bytes (e-mail content)
205
-
4 bytes (attempts, sending, failed, encrypted)
206
-
57 bytes (created_at, updated_at, deleted_at)
207
-
... x 10.000 rows = ± 21.55 MB
208
-
209
-
With encryption the table size is ± 50.58 MB.
210
-
```
211
-
212
-
213
204
### Queueing e-mails
214
205
215
206
**Important**: When queueing mail using the `queue` function, it is no longer necessary to schedule the `email:send` command. Please make sure it is removed from `app/Console/Kernel.php`.
@@ -235,22 +226,41 @@ Email::compose()
235
226
->queue(null, null, now()->addMinutes(10));
236
227
```
237
228
238
-
### Test mode (Optional)
229
+
If you need more flexibility over how to queued mails are retried, please implement your own email job.
230
+
231
+
Within the job you can send the mail like this:
232
+
233
+
```php
234
+
use Stackkit\LaravelDatabaseEmails\Sender;
235
+
236
+
(new Sender)->send($email);
237
+
```
238
+
239
+
### Test mode
239
240
240
241
When enabled, all newly created e-mails will be sent to the specified test e-mail address. This is turned off by default.
0 commit comments