File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,22 @@ header, etc.) but most of the times you'll set text headers::
201
201
// ...
202
202
;
203
203
204
+ When using a mailer service that supports tags and metadata, consider using the
205
+ ``TagHeader `` and ``MetadataHeader `` headers instead of the plain text headers::
206
+
207
+ use Symfony\Component\Mailer\Header\MetadataHeader;
208
+ use Symfony\Component\Mailer\Header\TagHeader;
209
+
210
+ $email->getHeaders()->add(new TagHeader('password-reset'));
211
+ $email->getHeaders()->add(new MetadataHeader('Client-ID', '12345'));
212
+
213
+ If your mailer doesn't support these tag/metadata headers, they are added to the
214
+ message as text headers (``X-Tag: password-reset ``, ``X-Metadata-Client-ID: 12345 ``).
215
+
216
+ .. versionadded :: 5.1
217
+
218
+ The ``TagHeader `` and ``MetadataHeader `` headers were introduced in Symfony 5.1.
219
+
204
220
Message Contents
205
221
~~~~~~~~~~~~~~~~
3F30
206
222
You can’t perform that action at this time.
0 commit comments