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
Copy file name to clipboardExpand all lines: README.md
+83-41Lines changed: 83 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,28 @@
10
10
## Introduction
11
11
12
12
This is a package that stores and queues e-mails using a database table. Easily send e-mails using a cronjob and schedule e-mails that should be sent at a specific date and time.
You may schedule an e-mail by calling `later` instead of `send` at the end of the chain. You must provide a Carbon instance or a strtotime valid date.
153
+
You may schedule an e-mail by calling `later` instead of `send`. You must provide a Carbon instance or a strtotime valid date.
120
154
121
155
```php
156
+
use Buildcode\LaravelDatabaseEmails\Email;
157
+
122
158
Email::compose()
123
159
->later('+2 hours');
124
160
```
125
161
126
-
###Manually Sending E-mails
162
+
#### Resend failed e-mails
127
163
128
-
If you're not running the cronjob and wish to send the queued e-mails, you can run the `email:send` command.
164
+
##### Resend all failed e-mails
129
165
130
166
```bash
131
-
$ php artisan email:send
167
+
php artisan email:retry
132
168
```
133
169
134
-
### Failed E-mails
135
-
136
-
By default, we will attempt to send an e-mail 3 times if it fails. If it still fails the 3rd time, it will permanently be marked as failed. You can change the number of times an e-mail should be attempted to be sent using the `retry.attempts` configuration.
137
-
138
-
### Retry sending failed e-mails
139
-
140
-
If you wish to retry sending failed e-mails, you may call the `email:retry` command. The command will grab any failed e-mail and push it onto the queue. You may also provide the id of a specific e-mail.
170
+
##### Resend a specific failed e-mail
141
171
142
172
```bash
143
-
$ php artisan email:retry
144
-
# or...
145
-
$ php artisan email:retry 1
173
+
php artisan email:retry 1
146
174
```
147
175
148
-
### Encryption
176
+
#### Encryption (Optional)
177
+
178
+
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.
149
179
150
-
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 encrypting the e-mail body takes a lot of disk space.
180
+
```text
181
+
Without encryption
151
182
152
-
### Testing Address
183
+
7 bytes (label)
184
+
16 bytes (recipient)
185
+
20 bytes (subject)
186
+
48 bytes (view name)
187
+
116 bytes (variables)
188
+
1874 bytes (e-mail content)
189
+
4 bytes (attempts, sending, failed, encrypted)
190
+
57 bytes (created_at, updated_at, deleted_at)
191
+
... x 10.000 rows = ± 21.55 MB
192
+
193
+
With encryption the table size is ± 50.58 MB.
194
+
```
153
195
154
-
If you wish to send e-mails to a test address but don't necessarily want to use a service like mailtrap, please take a look at the `testing` configuration. This is turned off by default.
196
+
#### Test mode (Optional)
155
197
156
-
During the creation of an e-mail, the recipient will be replaced by the test e-mail. This is useful for local development or testing on a staging server.
198
+
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