views:

35

answers:

1

Hi all,

I'm developing an email marketing system which allows users to send emails to multiple addresses. I have a list of tasks that need to be done, probably I will have many questions regarding to these tasks. Here's one of them: As I said, users are sending out emails to multiple addresses. I want to check for every sent out emails if the receipient address blocks the email and the reason of the block.

Usually this is coming back to an email from Mail Delivery System. I think the solution has to be somewhere around the idea of checking the incoming emails somehow. Please help me finding the best solution.

Thanks

**
  • UPDATE:

**

I'm going to update the content of the question. I forgot to say that these emails are sent our from a valid SMTP server with username and password, there should be a way to get the content of inbox from PHP somehow.

+2  A: 

I want to check for every sent out emails if the receipient address blocks the email and the reason of the block.

Forget it. Most spam filters will just swallow unwanted E-Mail without comment (so as to not give spammers any hint about their success or failure).

Also, you won't be able to find out if a user simply deleted your E-Mail straight away, or had a rule set up in their E-Mail client to delete it. This is information that you will never get hold of unless the recipient tells you.

Only a tiniest fraction of rejected E-Mails will actually cause a reply to go out to the E-Mail sender address - if any! I, for one, have had mails swallowed by spam filters, but I've never received a reply saying "your E-Mail was filtered as spam". Have you?

What you can do is catch E-Mails whose delivery failed for technical reasons - unknown recipient, recipient mailbox full, relaying failed... Those will be returned as "mailer-daemon" error messages to either the sender address, or the address specified in the errors-to header. Those mails you could parse using PHP. But I don't think this is what you want.

Pekka
Starts good. That's exactly what I want to know: if it fails because of an error. Can I somehow do that automatically after sending out the emails from PHP? I'm going to update the content of the question. I forgot to say that these emails are sent our from a valid SMTP server with username and password, there should be a way to get the content of inbox from PHP somehow.
Ervin
As a follow-up: It think it's really hard to parse bounce messages. You could write a parser for the most common errors (recipient not found, mailbox full etc), but it would require a lot of time and effort doing so since there's no real standard. The most common way is to use a unique sender address (Return-Path) for each message so you can see that there are coming a bounce error for some recipients (but not WHY it bounced).
Emil Vikström
@Ervin @Emil already says it well: It's hard to parse the bounce messages, but it should be possible to find out whether there has been an error. See e.g. http://stackoverflow.com/questions/1011714/bounce-email-handling-with-php
Pekka
and http://stackoverflow.com/questions/1784465/bounced-email-parsing
Pekka
and more: http://stackoverflow.com/search?q=php+pop3+bounce
Pekka