14 use Zend\Mail\Message;
15 use Zend\Mail\Transport\Sendmail;
37 private $zendTransport;
60 $isSetReturnPath = $scopeConfig->
getValue(
61 self::XML_PATH_SENDING_SET_RETURN_PATH,
64 $returnPathValue = $scopeConfig->
getValue(
65 self::XML_PATH_SENDING_RETURN_PATH_EMAIL,
69 if ($isSetReturnPath ==
'2' && $returnPathValue !==
null) {
70 $parameters .=
' -f' . \escapeshellarg($returnPathValue);
73 $this->zendTransport =
new Sendmail($parameters);
83 $this->zendTransport->send(
84 Message::fromString($this->message->getRawMessage())
86 }
catch (\Exception $e) {
96 return $this->message;
const XML_PATH_SENDING_RETURN_PATH_EMAIL
__construct(MessageInterface $message, ScopeConfigInterface $scopeConfig, $parameters=null)
getValue($path, $scopeType=ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode=null)
const XML_PATH_SENDING_SET_RETURN_PATH