<?php
 class vB_Mail_Transport_Legacy_PhpMail extends vB_Mail_Transport_Legacy { protected function __construct() { parent::__construct(); $sendmail_path = @ini_get('sendmail_path'); if (!$sendmail_path OR defined('FORCE_MAIL_CRLF')) { $this->delimiter = "\r\n"; } else { $this->delimiter = "\n"; } } public function send(array|string $to, string $subject, string $message, bool $isHtml, array $headers, array|string $replyto = '') : bool { if (!$this->prepareMail($to, $subject, $message, $isHtml, $headers, $replyto)) { return false; } if (!$this->toemail) { return false; } @ini_set('sendmail_from', $this->fromemail); if ($delay = intval(vB::getDatastore()->getOption('mail_delay'))) { @sleep($delay); } if (vB::getDatastore()->getOption('needfromemail')) { $result = @mail($this->toemail, $this->subject, $this->message, trim($this->headers), '-f ' . $this->fromemail); } else { $result = @mail($this->toemail, $this->subject, $this->message, trim($this->headers)); } return $result; } } 