Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3371c87

Browse filesBrowse files
committed
minor #18765 [Mailer] Fix attachment changes (HeahDude)
This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Mailer] Fix attachment changes The title of symfony/symfony#47711 did not change before merge, but actually only `attachPart` has been deprecated (renamed) in favor of `addPart`. I did not reintroduce the other methods as they may be deprecated in 7.1, so no need to document a way that may change in a few months. Also the `BodyFile` class has been renamed in symfony/symfony#48060 whereas the use in the example code was correct. Commits ------- 46923d0 [Mailer] Fix attachment changes
2 parents 2a870d8 + 46923d0 commit 3371c87
Copy full SHA for 3371c87

File tree

1 file changed

+9
-12
lines changed
Filter options

1 file changed

+9
-12
lines changed

‎mailer.rst

Copy file name to clipboardExpand all lines: mailer.rst
+9-12Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.