nadeemshafi9 Posted February 13, 2009 Share Posted February 13, 2009 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 Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/ Share on other sites More sharing options...
nadeemshafi9 Posted February 13, 2009 Author Share Posted February 13, 2009 Sorry this is silly bouncbacks can takes weeks, but i still need the code read custom headers any help im looking into it Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761205 Share on other sites More sharing options...
printf Posted February 13, 2009 Share Posted February 13, 2009 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! Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761218 Share on other sites More sharing options...
nadeemshafi9 Posted February 13, 2009 Author Share Posted February 13, 2009 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 Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761227 Share on other sites More sharing options...
nadeemshafi9 Posted February 13, 2009 Author Share Posted February 13, 2009 dont test it, just post it i will test it, as i have teh system set up here Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761229 Share on other sites More sharing options...
printf Posted February 13, 2009 Share Posted February 13, 2009 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... Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761233 Share on other sites More sharing options...
nadeemshafi9 Posted February 13, 2009 Author Share Posted February 13, 2009 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 Link to comment https://forums.phpfreaks.com/topic/145063-ajaxian-settimout-impap-bouncback-capturing/#findComment-761238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.