Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Undelivered mail check and SMTP lag?



10:32 am on Mar 1, 2011 (gmt 0)

5+ Year Member

Hi there,

My company started sending out emails to clients, and started receiving heaps of undelivered emails.

My company uses Google Mail for their corporate email accounts, and have a sort of no-reply email address that is used for checking how many emails have returned. Emails are sent through a custom PHP mail system. Yesterday out of 70 000 emails sent, 25 000 got returned with undelivered status. Going through all of them and deleting them by hand is ... yeah .. :)

Is there any way to efficiently check what emails where undelivered and sent back?

My thought was to login to Google Mail with curl(), and retrieve all the undelivered emails, but is there a way to sort of pipe the emails from Google Mail into a PHP file, that handles recognition and deletion of those undelivered emails?


1:08 pm on Mar 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Is there any way to efficiently check what emails where undelivered and sent back?

You could build/use a PHP email client to read read your email and process it. (That is, a program that read the mail itself, not necessarily a web app that lets you read your email.)

If you are looking for a solution that can run on your own PC, you can use a desktop email client (such as Apple Mail) to process download the mail. If your email client stores received emails as plain text files, a simple script running on your machine can read those files and pull the relevant info out.

A quick Google search for "where does <my mail client> store messages" should answer where your mail messages are saved. You can also use mail rules in your email client to move the bounced messages into a separate directory.

Featured Threads

Hot Threads This Week

Hot Threads This Month