Skip to content

Commit

Permalink
Merge pull request #18 from Shetza/patch-2
Browse files Browse the repository at this point in the history
Add missing references to SparkPostEmailUtils (instead of self)
  • Loading branch information
lekoala committed Sep 30, 2021
2 parents ffb04c2 + e46e63c commit 015bf25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/SparkPostMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ protected function processAddress($address)
$email = $address['email'];
$name = $address['name'];
} elseif (strpos($address, '<') !== false) {
$email = self::get_email_from_rfc_email($address);
$name = self::get_displayname_from_rfc_email($address);
$email = SparkPostEmailUtils::get_email_from_rfc_email($address);
$name = SparkPostEmailUtils::get_displayname_from_rfc_email($address);
} else {
$email = $address;
$name = null;
Expand Down Expand Up @@ -484,7 +484,7 @@ public static function resolveDefaultFromEmail($from = null)
$original_from = $from;
if (!empty($from)) {
// If we have a sender, validate its email
$from = self::get_email_from_rfc_email($from);
$from = SparkPostEmailUtils::get_email_from_rfc_email($from);
if (filter_var($from, FILTER_VALIDATE_EMAIL)) {
return $original_from;
}
Expand Down Expand Up @@ -517,7 +517,7 @@ public static function resolveDefaultToEmail($to = null)
}
$original_to = $to;
if (!empty($to)) {
$to = self::get_email_from_rfc_email($to);
$to = SparkPostEmailUtils::get_email_from_rfc_email($to);
if (filter_var($to, FILTER_VALIDATE_EMAIL)) {
return $original_to;
}
Expand Down

0 comments on commit 015bf25

Please sign in to comment.