Redaxscript\Mailer::send PHP Метод

send() публичный Метод

send the email
С версии: 2.6.2
public send ( ) : boolean
Результат boolean
    public function send()
    {
        $output = false;
        if (function_exists('mail')) {
            foreach ($this->_toArray as $to) {
                if ($to) {
                    $output = mail($to, $this->_subjectString, $this->_bodyString, $this->_headerString);
                }
            }
        }
        return $output;
    }

Usage Example

Пример #1
0
 /**
  * testMessage
  *
  * @since 2.2.0
  *
  * @param array $toArray
  * @param array $fromArray
  * @param string $subject
  * @param mixed $body
  * @param array $attachmentArray
  *
  * @dataProvider providerMailer
  */
 public function testMessage($toArray = [], $fromArray = [], $subject = null, $body = null, $attachmentArray = [])
 {
     /* setup */
     $mailer = new Mailer();
     $mailer->init($toArray, $fromArray, $subject, $body, $attachmentArray);
     /*compare */
     $this->assertTrue(is_bool($mailer->send()));
 }
All Usage Examples Of Redaxscript\Mailer::send