Skip to content

Commit

Permalink
Merge pull request #14 from ppavlovic/master
Browse files Browse the repository at this point in the history
Override sender domain inside From:
  • Loading branch information
ppavlovic committed Sep 13, 2021
2 parents accc270 + e9d1c97 commit 9ace7b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,18 @@ public function getLogId()
return $this->logId ?: null;
}

public function overrideSenderDomain($senderDomain)
{
if (empty($senderDomain)) {
return;
}
$this->from = preg_replace(
'/([^<]*)<([^@]*)@([^>]*)>/',
'$1<$2@' . $senderDomain . '>',
$this->from
);
}

/**
* @param array $options Array of email or href that is used to unsubscribe user
*/
Expand Down

0 comments on commit 9ace7b6

Please sign in to comment.