Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Return-Path Email is not used #215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/Transport/Sendmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,27 @@ protected function prepareParameters(Mail\Message $message)
return;
}

$parameters = (string) $this->parameters;
$parameters = '';
$priorityParameters = '';

if ($this->parameters)
$priorityParameters = (string) $this->parameters;

$sender = $message->getSender();
if ($sender instanceof AddressInterface) {
$parameters .= ' -f' . \escapeshellarg($sender->getEmail());
return $parameters;
return $parameters . $priorityParameters;
}

$from = $message->getFrom();
if (count($from)) {
$from->rewind();
$sender = $from->current();
$parameters .= ' -f' . \escapeshellarg($sender->getEmail());
return $parameters;
return $parameters . $priorityParameters;
}

return $parameters;
return $parameters . $priorityParameters;
}

/**
Expand Down