Skip to content

Commit

Permalink
Fixed some losts changes caused by the recent merge
Browse files Browse the repository at this point in the history
Some minor enhancements to previous merge

Fixed indentations
  • Loading branch information
SL-Gundam committed Jan 29, 2014
1 parent d15443e commit bd81f8e
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 151 deletions.
12 changes: 6 additions & 6 deletions EmailReporting.php
Expand Up @@ -51,6 +51,9 @@ function config()
# Add complete email into the attachments
'mail_add_complete_email' => OFF,

// Add users from Cc and To field in mail header
'mail_add_users_from_cc_to' => OFF,

# Signup new users automatically (possible security risk!)
# Default is OFF, if mail_use_reporter is OFF and this is OFF then it will
# fallback to the mail_reporter account above
Expand Down Expand Up @@ -154,6 +157,9 @@ function config()
# via a webserver?
'mail_secured_script' => ON,

//Strip Gmail style replies from body of the message
'mail_strip_gmail_style_replies' => OFF,

#Removes the signature that are delimited by mail_strip_signature_delim
'mail_strip_signature' => OFF,

Expand All @@ -170,12 +176,6 @@ function config()
# ON = mail uses the reporter account in the setting below
# OFF = it identifies the reporter using the email address of the sender
'mail_use_reporter' => ON,

//Strip Gmail style replies from body of the message
'mail_strip_gmail_style_replies' => OFF,

// Add users from Cc and To field in mail header
'mail_add_users_from_cc_to' => OFF,
);
}

Expand Down
30 changes: 15 additions & 15 deletions core/Mail/Parser.php
Expand Up @@ -267,8 +267,8 @@ private function parseStructure( &$structure )
$this->setFrom( $structure->headers['from'] );
$this->setSubject( $structure->headers['subject'] );

if ( isset( $structure->headers['x-priority'] ) )
{
if ( isset( $structure->headers['x-priority'] ) )
{
$this->setPriority( $structure->headers['x-priority'] );
}

Expand All @@ -289,9 +289,9 @@ private function parseStructure( &$structure )
}

$this->setTo( $structure->headers['to'] );
if ( isset( $structure->headers['cc'] ) )
{

if ( isset( $structure->headers['cc'] ) )
{
$this->setCc( $structure->headers['cc'] );
}
}
Expand All @@ -308,20 +308,20 @@ private function setSubject( $subject )

private function setTo( $p_to )
{
$regex = '([\\w-+]+(?:\\.[\\w-+]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7})';
if( preg_match_all ("/".$regex."/is", $p_to, $matches) )
{
$this->_to = $matches[1];
}
$regex = '([\\w-+]+(?:\\.[\\w-+]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7})';
if( preg_match_all ( "/" . $regex . "/is", $p_to, $matches ) )
{
$this->_to = $matches[1];
}
}

private function setCc( $p_cc )
{
$regex = '([\\w-+]+(?:\\.[\\w-+]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7})';
if( preg_match_all ("/".$regex."/is", $p_cc, $matches) )
{
$this->_cc = $matches[1];
}
$regex = '([\\w-+]+(?:\\.[\\w-+]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7})';
if( preg_match_all ( "/" . $regex . "/is", $p_cc, $matches ) )
{
$this->_cc = $matches[1];
}
}

private function setPriority( $priority )
Expand Down

0 comments on commit bd81f8e

Please sign in to comment.