Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Working on 'No Subject' parsing

  • Loading branch information...
commit ecdbdc892f6d8050171bca11c469695e3cd4c276 1 parent dac9f20
@stefancrain stefancrain authored
View
2  civicrm/custom/php/CRM/IMAP/AJAX.php
@@ -157,7 +157,7 @@ public static function unifiedMessageInfo($email) {
$origin_subject = ($status == 'direct') ? preg_replace("/(Fwd:|fwd:|Fw:|fw:|Re:|re:) /i", "", $header['subject']) : preg_replace("/(Fwd:|fwd:|Fw:|fw:|Re:|re:) /i", "", $subjects['2']);
$origin_subject = preg_replace("/(\(|\))/i", "", $origin_subject);
- if( trim(strip_tags($origin_subject)) =='' || strtolower($origin_subject) == 'no subject' ){
+ if( trim(strip_tags($origin_subject)) == "" | trim($origin_subject) == "no subject"){
$origin_subject = "No Subject";
}
View
2  civicrm/scripts/processMailboxes.php
@@ -488,7 +488,7 @@ function civiProcessEmail($email, $customHandler)
// remove () sometimes found in emails with no subject
$subject = preg_replace("/(\(|\))/i", "", $subject);
- if( trim(strip_tags($origin_subject)) == "" | $subject == "no subject"){
+ if( trim(strip_tags($subject)) == "" | trim($subject) == "no subject"){
$subject = "No Subject";
}
Please sign in to comment.
Something went wrong with that request. Please try again.