Skip to content

Commit 28af5e6

Browse files
committed
Reword
1 parent 66dbcb6 commit 28af5e6

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

mailer.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -279,29 +279,28 @@ images inside the HTML contents::
279279
->html('<img src="cid:logo"> ... <img src="cid:footer-signature"> ...')
280280
;
281281

282-
Catching Transport Exceptions
283-
-----------------------------
282+
Handling Sending Failures
283+
-------------------------
284+
285+
Symfony Mailer considers that sending was successful when your transport (SMTP
286+
server or third-party provider) accepts the mail for further delivery. The message
287+
can later be lost or not delivered because of some problem in your provider, but
288+
that's out of reach for your Symfony application.
284289

285-
If handing over the email to your transport fails, a
286-
:class:`Symfony\\Component\\Mailer\\Exception\\TransportExceptionInterface` is thrown. To
287-
make sure that sending the email was successful, you can catch that exception::
290+
If there's an error when handing over the email to your transport, Symfony throws
291+
a :class:`Symfony\\Component\\Mailer\\Exception\\TransportExceptionInterface`.
292+
Catch that exception to recover from the error or to display some message::
288293

289294
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
290295

291296
$email = new Email();
292297
// ...
293298
try {
294299
$mailer->send($email);
295-
// Display message that email was successfully sent
296300
} catch (TransportExceptionInterface $e) {
297-
// Display message that sending the email failed
301+
// some error prevented the email sending; display an
302+
// error message or try to resend the message
298303
}
299-
300-
.. caution::
301-
302-
For Mailer, the sending process was successful, if your transport (SMTP
303-
server or 3rd party provider) accepted the mail for further delivery. This
304-
does not mean that the email has already arrived at the recipient's mail server.
305304

306305
Debugging Emails
307306
----------------

0 commit comments

Comments
 (0)