public function testAddGenericHeaderReturnsCorrectHeader()
 {
     $this->mailer->addGenericHeader('Version', 'PHP5');
     $this->assertContains("Version: PHP5", $this->mailer->getHeaders());
 }
Пример #2
0
 /**
  * e-mail küldése SimpleMail-el
  *
  * @return 
  */
 public function sendSimple()
 {
     //include(LIBS . '/simplemail_class.php');
     $mail = new SimpleMail();
     $mail->setTo($this->to_email, $this->to_name);
     $mail->setSubject($this->subject);
     $mail->setFrom($this->from_email, $this->from_name);
     $mail->addMailHeader('Reply-To', $this->from_email, $this->from_name);
     $mail->addGenericHeader('MIME-Version', '1.0');
     $mail->addGenericHeader('Content-Type', 'text/html; charset="utf-8"');
     $mail->addGenericHeader('X-Mailer', 'PHP/' . phpversion());
     $body = $this->_load_template_with_data($this->template, $this->template_data);
     $mail->setMessage($body);
     $mail->setWrap(100);
     // final sending and check
     if ($mail->send()) {
         return true;
     } else {
         return false;
     }
 }