39 'command' =>
'/usr/sbin/sendmail -bs',
59 if (
false !== strpos($this->
getCommand(),
' -bs'))
76 $this->_params[
'command'] = $command;
86 return $this->_params[
'command'];
101 $failedRecipients = (array) $failedRecipients;
105 if (
false !== strpos($command,
' -t'))
107 if ($evt = $this->_eventDispatcher->createSendEvent($this, $message))
109 $this->_eventDispatcher->dispatchEvent($evt,
'beforeSendPerformed');
110 if ($evt->bubbleCancelled())
116 if (
false === strpos($command,
' -f'))
121 $buffer->initialize(array_merge($this->_params, array(
'command' => $command)));
123 if (
false === strpos($command,
' -i') &&
false === strpos($command,
' -oi'))
125 $buffer->setWriteTranslations(array(
"\r\n" =>
"\n",
"\n." =>
"\n.."));
129 $buffer->setWriteTranslations(array(
"\r\n"=>
"\n"));
132 $count = count((array) $message->
getTo())
133 + count((array) $message->
getCc())
134 + count((array) $message->
getBcc())
137 $buffer->flushBuffers();
138 $buffer->setWriteTranslations(array());
139 $buffer->terminate();
144 $evt->setFailedRecipients($failedRecipients);
145 $this->_eventDispatcher->dispatchEvent($evt,
'sendPerformed');
150 elseif (
false !== strpos($command,
' -bs'))
152 $count = parent::send($message, $failedRecipients);
157 'Unsupported sendmail command flags [' . $command .
']. ' .
158 'Must be one of "-bs" or "-t" but can include additional flags.'