Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/395548 )
Change subject: More debugging for email
......................................................................
More debugging for email
Change-Id: I446fa9dac7a742b4c9b71ea5641f28706c26e14f
---
M CRM/Utils/Mail/EmailProcessor.php
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm
refs/changes/48/395548/1
diff --git a/CRM/Utils/Mail/EmailProcessor.php
b/CRM/Utils/Mail/EmailProcessor.php
index 0e297f2..ebe7736 100644
--- a/CRM/Utils/Mail/EmailProcessor.php
+++ b/CRM/Utils/Mail/EmailProcessor.php
@@ -184,6 +184,7 @@
if ($usedfor == 1) {
foreach ($mail->to as $address) {
+ watchdog('EmailProcessor', "With address: $address", array(),
WATCHDOG_DEBUG);
if (preg_match($regex, $address->email, $matches)) {
list($match, $action, $job, $queue, $hash) = $matches;
break;
@@ -273,6 +274,7 @@
// get $replyTo from either the Reply-To header or from From
// FIXME: make sure it works with Reply-Tos containing non-email stuff
$replyTo = $mail->getHeader('Reply-To') ? $mail->getHeader('Reply-To')
: $mail->from->email;
+ watchdog('EmailProcessor', "With Reply-To: $replyTo", array(),
WATCHDOG_DEBUG);
// handle the action by passing it to the proper API call
// FIXME: leave only one-letter cases when dropping legacy support
@@ -287,9 +289,11 @@
$text = $mail->body->text;
}
elseif ($mail->body instanceof ezcMailMultipart) {
+ watchdog('EmailProcessor', "Body is multipart", array(),
WATCHDOG_DEBUG);
if ($mail->body instanceof ezcMailMultipartReport) {
$part = $mail->body->getMachinePart();
if ($part instanceof ezcMailDeliveryStatus) {
+ watchdog('EmailProcessor', "Part is DeliveryStatus",
array(), WATCHDOG_DEBUG);
foreach ($part->recipients as $rec) {
if (isset($rec["Diagnostic-Code"])) {
$text = $rec["Diagnostic-Code"];
@@ -314,14 +318,17 @@
}
}
elseif ($part != NULL and isset($part->text)) {
+ watchdog('EmailProcessor', "Part is not DeliveryStatus but
has text", array(), WATCHDOG_DEBUG);
$text = $part->text;
}
elseif (($part = $mail->body->getReadablePart()) != NULL) {
+ watchdog('EmailProcessor', "Part is not DeliveryStatus but
supposedly has ReadablePart", array(), WATCHDOG_DEBUG);
$text = $part->text;
}
}
elseif ($mail->body instanceof ezcMailMultipartRelated) {
foreach ($mail->body->getRelatedParts() as $part) {
+ watchdog('EmailProcessor', "Looking at related part",
array(), WATCHDOG_DEBUG);
if (isset($part->subType) and $part->subType == 'plain') {
$text = $part->text;
break;
@@ -331,6 +338,7 @@
else {
foreach ($mail->body->getParts() as $part) {
if (isset($part->subType) and $part->subType == 'plain') {
+ watchdog('EmailProcessor', "Part subtype is plain",
array(), WATCHDOG_DEBUG);
$text = $part->text;
break;
}
--
To view, visit https://gerrit.wikimedia.org/r/395548
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I446fa9dac7a742b4c9b71ea5641f28706c26e14f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits