Skip to content

Commit

Permalink
Get the correct parts of email addresses
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
AJenbo committed Jun 18, 2018
1 parent d5e0226 commit a08b413
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/inc/Models/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ public function getRecipientAddress(): string
public static function mapFromDB(array $data): array
{
$data['from'] = explode('<', $data['from']);
$senderName = trim($data['from'][0]);
$senderAddress = mb_substr($data['from'][1], 0, -1);
$senderAddress = trim($data['from'][0]);
$senderName = mb_substr($data['from'][1], 0, -1);

$data['to'] = explode('<', $data['to']);
$recipientName = trim($data['to'][0]);
$recipientAddress = mb_substr($data['to'][1], 0, -1);
$recipientAddress = trim($data['to'][0]);
$recipientName = mb_substr($data['to'][1], 0, -1);

return [
'id' => $data['id'],
Expand Down

0 comments on commit a08b413

Please sign in to comment.