I'm sending emails with PHPMailer. When an email is bounced it goes to an account like this: account_bounces@domain.com
Inside my email client where I manage this account (account_bounces@domain.com), I have the option to adds filters in order to redirect an email to any other email account, based on the comparation of fields like "Subject", "From", "To" and so on. That's good.
The problem is that the bounced email loses all of my headers/Subject...that I set with PHPMailer because it's ALWAYS composed by the server as it follows:
- Subject: Undelivered Mail Returned to Sender
- From: MAILER-DAEMON@llsd409-a04.servidoresdns.net
- To: account_bounces@domain.com
- Date: Today hh:mm
So I have no guide marks to use for adding a filter.
So, is there any way to set a mark(like a custom header, etc...) in PHPMailer that REMAINS in the bounced email?. For example, something like having this:
- Subject: Undelivered Mail Returned to Sender (bounce_redirect)
So the word "bounce_redirect" in the Subject(or wherever) would indicate my email client that this email has to be redirected.
Thanks in advance.