Open glena opened 10 years ago
//To feed the parser a properly formatted MIME email, make sure there is a double line return between the header and body.
$bounce = imap_fetchheader($conn, $n) . "\r\n" . "\r\n" . imap_body($conn, $n); //entire message
No, still the same (I replace my line with yours). Is there a better way to get the emails than imap_open that works better with your class?
That should have worked. You should examine the contents of the $bounce variable to see where it went wrong.
You will need to start with a plain text email. Each and every email is saved as a file on the mail server. Talk with your server admin about how to access those files.
I will check this variable. The issue is that we are using google apps :(
Germán Lena
Sent from my mobile. Please excuse the brevity, spelling and punctuation. El feb 8, 2014 8:13 PM, "cfortune" notifications@github.com escribió:
That should have worked. You should examine the contents of the $bounce variable to see where it went wrong.
You will need to start with a plain text email. Each and every email is saved as a file on the mail server. Talk with your server admin about how to access those files.
— Reply to this email directly or view it on GitHubhttps://github.com/cfortune/PHP-Bounce-Handler/issues/8#issuecomment-34559586 .
Hi, we are trying to implement your class in our code to check bounces but we are getting the following error:
0 /vagrant/leads/cron/bounce/bounce_driver.class.php(500):
1 /vagrant/leads/cron/bounce/bounce_driver.class.php(431): BounceHandler->standard_parser
2 /vagrant/leads/cron/bounce/bounce_driver.class.php(107): BounceHandler->parse_head
3 /vagrant/leads/cron/bouncemailparser.php(36): BounceHandler->get_the_facts
4 /vagrant/leads/cron/bouncemailparser.php(74): BounceMailParser->run
To get the emails we are using imap_open in the following way:
$conn = imap_open($host, $user, $pass, OP_SILENT) or die(imap_last_error());
$num_msgs = imap_num_msg($conn); $email_addresses = array(); $delete_addresses = array(); for($n = 1; $n <= $num_msgs; $n++) { $bounce = imap_fetchheader($conn, $n) . imap_body($conn, $n); //entire message $multiArray = $bouncehandler->get_the_facts($bounce); }