Jump to content

Ajaxian Settimout Impap Bouncback Capturing


nadeemshafi9

Recommended Posts

Hi guys

 

I am reading mailbox to try and capture bounce backs exactly after the mails have been sent using an ajaxian set timeout, now the synchronization is bad as it takes long for the mail to be retrieved, is there a faster way of doing it. My current method is as follows and it takes up to 5 or 10 seconds which isn't good enough to look real time:

 

<?php
$mbox = imap_open("{mail.x.com:995/pop3/ssl/novalidate-cert}INBOX", "[email protected]", "x");


echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{imap.mail.x.com:143}", "*");

if ($folders == false) {
	echo "Call failed<br />\n";
} else {
	foreach ($folders as $val) {
		echo $val . "<br />\n";
	}
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
	echo "Call failed<br />\n";
} else {
	foreach ($headers as $val) {
		echo $val . "<br />\n";
	}
}
?>

 

And is there a way to get only mails based on a custom header straight off the server instead of getting them all and then filtering.

 

Thanks

Tell me what you are looking for in the message header, body or both, (IE: FROM: ?, RETURN PATH, FILETYPE=*.pdf)? Tell me the MTA type (IE: Dovecot, or other) so I know what it supports, or if it's an onle service tell me that services name! After I will give you example that does this server side, instead of reading every message header!

 

Tell me what you are looking for in the message header, body or both, (IE: FROM: ?, RETURN PATH, FILETYPE=*.pdf)? Tell me the MTA type (IE: Dovecot, or other) so I know what it supports, or if it's an onle service tell me that services name! After I will give you example that does this server side, instead of reading every message header!

 

 

i just put a custom header in the email header it is user-id

 

Content-Type: multipart/mixed;

boundary="=_13e847ba35983fbc93e81edc364f6412"

MIME-Version: 1.0

User-Id: 1

Message-Id: <[email protected]>

Date: Fri, 13 Feb 2009 11:41:36 +0000 (GMT)

 

i just need to get these emails that contains the users id so i can show him his bounces

Okay got it, I have an IT meeting now, but when I get back in about an hour and a half I will give you an example that will speed up the process...

 

thanks alot m8 i hope to repay it at some point lol if that's even possible you never know lol i may have some expertise in other fields

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.