Symfonymailer: (how) can I use DSN/bounce messages for delivery confirmation?

Hello World!

I am sending mails via the Symfony Mailer Extension.

I would like to recieve a Delivery Status Notification (DSN) from the recieving Mailserver, when a mail has been successfully recieved by the server. I can’t seem to find any reference to the correct syntax (or infos, if this is even possible).

To clarify: I am NOT talking about X-Confirm-Reading-To or similar that would prompt the user to “confirm mail has been read” (aka Message Disposition Notification, MDN) in his Mail User Agent (MUA). See RFC3798 2.1 This is request to the user and needs an action taken by the user.

I am looking for a way to get a DSN from the server itself, like other bounce messages (“550 user unknown”, “5.2.2 mailbox full” etc.) via the DSN command NOTIFY=SUCCESS, I don’t care at this point what happens to the mail itself after it reached the mailserver.

Example:

RCPT TO:<someone@example.com> NOTIFY=SUCCESS,FAILURE ORCPT=rfc822;someone@example.com

Can this be done?
And if yes: how?

Any info would be highly appreciated. :slight_smile:

Just a note. If you are using an smtp transport then you are likely not going to get any status as a reply. They typically just receive the email during the connection. After that they send the email to the destination server and store the status.

So it depends on the transport you are using.

I don’t need to get any direct reply.
I want the DSN to be delivered to my Inbox, which is then checked by a cronjob for incoming messages which calls a method of my CronController that checks if the message is a server reply (DSN) and update the log entry in the DB.

I’m not sure I understand. But it sounds like you want your smtp service (Sending MDA/MTA) to send you the DSN via an email. That would be something that you would have to set up with the service itself.

Most smtp services no longer send reply emails since the email world is now way too cluttered with spam. They usually offer an API where you can call to retrieve any information about you email deliveries.

Please note, however, that there is no real standard as far as DSN goes. Every email recipient MDA/MTA follows it’s own rules as to replies to the sending MDA/MTA. A few never reply at all. And the Codes used in the DSN have no real standard either. Most follow some basic standard, but there are way too many exceptions. The smtp service (Sending MDA/MTA) will usually have very complicated code trying to interpret the DSN’s.

By the way, this forum is probably not the place to ask for that information since it is not directly related to the this library. I believe you’d get more specific help on the forums that deal with your Sending MDA/MTA service.