[CentOS] Bounced email processing
John Doe
jdmls at yahoo.com
Wed Nov 5 09:50:41 UTC 2014
From: Hugh E Cruickshank <hugh at forsoft.com>
> We are looking for a way to automate the handling of bounced emails.
> I have spend some time looking an scan find one open source package,
> bounceHammer, and one commercial package, BoogieTools.
> Does any comments on the effectiveness of either package?
> Any suggestions on other packages?
If you just need something "simple" and know a bit php, you could try...
---
if ($mbox = imap_open("{imap.domain.com:993/ssl}FOLDER", "$email", "$passwd",
OP_READONLY+OP_DEBUG)) {
$sorted_mbox = imap_sort($mbox, SORTARRIVAL, 0);
$status = imap_status($mbox, "{imap.domain.com:993/ssl}FOLDER",
SA_MESSAGES+SA_UNSEEN);
$msgs_total = $status->messages;
if ($msgs_total == 0) { print "No mails...\n"; exit(1); }
for ($i=0; $i<$msgs_total; $i++) {
# print imap_fetchheader($mbox, $sorted_mbox[$i]);
$body = imap_body($mbox, $sorted_mbox[$i]);
foreach (explode("\n", $body) as $line) {
...
}
# imap_setflag_full($mbox, $i, "\\Seen");
}
#imap_expunge($mbox);
imap_close($mbox);
---
JD
More information about the CentOS
mailing list