Skip to content

Commit

Permalink
SendmailMailer: 'From' is passed as cmd argument [Closes #78]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 26, 2023
1 parent e31c1cb commit 0e236e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Mail/SendmailMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public function send(Message $mail): void
str_replace(Message::EOL, PHP_EOL, $parts[1]),
$parts[0],
];

if ($from = $mail->getFrom()) {
$args[] = '-f' . key($from);
}

if ($this->commandArgs) {
$args[] = $this->commandArgs;
}
Expand Down

0 comments on commit 0e236e4

Please sign in to comment.