Re: Bounced email processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Hugh E Cruickshank <hugh@xxxxxxxxxxx>
> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux