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
Solved

Check for Returned Messages with IMAP/PHP

Posted on 2008-10-14
1
1,042 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

840 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