Solved

Check for Returned Messages with IMAP/PHP

Posted on 2008-10-14
1
1,057 Views
Last Modified: 2013-11-29
Hello,

I want to use PHP to connect to my IMAP server and retrieve a list of bounced messages.

So if I send out 10 messages and 5 bounce back I want to use PHP / IMAP to get a list of the 5 that bounced back.
0
Comment
Question by:hankknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
RWJDCom earned 500 total points
ID: 22713826
I found some good reading on this subject over at:
http://www.devarticles.com/c/a/PHP/Create-Your-Own-Mail-Script-With-PHP-and-IMAP/

That will teach you how to make your own mail script and then you can just use like preg_match to match the subjects listed below to see if the email has bounced:
        'Mail delivery failed',
        'Delivery Notification: Delivery has failed',
        'Non delivery report',
        'Returned mail',
        'Mail System Error - Returned Mail',
        'Undeliverable message',
        'Delivery Status Notification',
        'Nondeliverable mail',
        'Warning: could not send message',
        'Undeliverable Mail',
        'Undeliverable:',
        'Undelivered Mail Returned to Sender',
        'Failure Notice',
        'Delivery Failure',
        'Message status - undeliverable',
        'Mail could not be delivered',
        'Delivery unsuccessful',
        'Mail Delivery Problem',
        'delayed 24 hours',
        'delayed 48 hours',
        'delayed 72 hours',
        'delivery report',
        'failure delivery',
        'delivery notification',
        'mail status report',
        'error delivering mail',
        'mail not delivered',
        '**Message you sent blocked by our bulk email filter**',
        'Marked As Spam:',
        'delivery_failure'

I hope this helps.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What is this? I've never seen this... 2 29
while read ID; do 4 55
restriction of entering a a page 5 31
geting data from the array list 6 11
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question