Skip to content

Commit 46923d0

Browse files
HeahDudejaviereguiluz
authored andcommitted
[Mailer] Fix attachment changes
1 parent 66a8003 commit 46923d0

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

mailer.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ result of rendering some template) or PHP resources::
549549
File Attachments
550550
~~~~~~~~~~~~~~~~
551551

552-
Use the ``addPart()`` method with a ``BodyFile`` to add files that exist on your file system::
552+
Use the ``addPart()`` method with a ``File`` to add files that exist on your
553+
file system::
553554

554555
use Symfony\Component\Mime\Part\DataPart;
555556
use Symfony\Component\Mime\Part\File;
@@ -564,7 +565,8 @@ Use the ``addPart()`` method with a ``BodyFile`` to add files that exist on your
564565
->addPart(new DataPart(new File('/path/to/documents/contract.doc'), 'Contract', 'application/msword'))
565566
;
566567

567-
Alternatively you can attach contents from a stream by passing it directly to the ``DataPart`` ::
568+
Alternatively you can attach contents from a stream by passing it directly to
569+
the ``DataPart``::
568570

569571
$email = (new Email())
570572
// ...
@@ -573,9 +575,9 @@ Alternatively you can attach contents from a stream by passing it directly to th
573575

574576
.. deprecated:: 6.2
575577

576-
In Symfony versions previous to 6.2, the methods ``attachFromPath()`` and
577-
``attach()`` could be used to add attachments. These methods have been
578-
deprecated and replaced with ``addPart()``.
578+
In Symfony versions previous to 6.2, the method ``attachPart()`` could be
579+
used to add attachments. This method has been deprecated and replaced
580+
with ``addPart()``.
579581

580582
Embedding Images
581583
~~~~~~~~~~~~~~~~
@@ -616,13 +618,8 @@ images inside the HTML contents::
616618

617619
.. versionadded:: 6.1
618620

619-
The support of embedded images as HTML backgrounds was introduced in Symfony 6.1.
620-
621-
.. deprecated:: 6.2
622-
623-
In Symfony versions previous to 6.2, the methods ``embedFromPath()`` and
624-
``embed()`` could be used to embed images. These methods have been deprecated
625-
and replaced with ``addPart()`` together with inline ``DataPart`` objects.
621+
The support of embedded images as HTML backgrounds was introduced in Symfony
622+
6.1.
626623

627624
.. _mailer-configure-email-globally:
628625

0 commit comments

Comments
 (0)