メール送信処理はできているのですが、
下記の最後の(pclose($handle) === -1)で例外がなげられてしまいます。
ちなみに、popenの実行コマンドは、以下のようになっていました
/usr/sbin/sendmail -oi -f test@gmail.com -t
ハンドルは resource id='84' type='Unknown' です。
type='Unkown'のため、pcloseできないのでしょうか。
お手数をお掛けしますがよろしくお願い致します。
問題のソース
=============
protected function _send()
{
// Build the message
$message = $this->build_message();
// Open a connection
$return_path = ($this->config['return_path'] !== false) ? $this->config['return_path'] : $this->config['from']['email'];
$handle = @popen($this->config['sendmail_path'] . " -oi -f ".$return_path." -t", 'w');
// No connection?
if(! is_resource($handle))
{
throw new \SendmailConnectionException('Could not open a sendmail connection at: '.$this->config['sendmail_path']);
}
// Send the headers
fputs($handle, $message['header']);
// Send the body
fputs($handle, $message['body']);
if(pclose($handle) === -1)
{
throw new \SendmailFailedException('Failed sending email through sendmail.');
}
return true;
}