TYPO3 CMS  TYPO3_6-2
MailMessage.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Core\Mail;
3 
17 // Make sure Swift's auto-loader is registered
18 require_once PATH_typo3 . 'contrib/swiftmailer/swift_required.php';
19 
25 class MailMessage extends \Swift_Message {
26 
30  protected $mailer;
31 
35  protected $mailerHeader = 'TYPO3';
36 
42  protected $sent = FALSE;
43 
49  protected $failedRecipients = array();
50 
54  private function initializeMailer() {
55  $this->mailer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\Mailer');
56  }
57 
64  public function send() {
65  $this->initializeMailer();
66  $this->sent = TRUE;
67  $this->getHeaders()->addTextHeader('X-Mailer', $this->mailerHeader);
68  return $this->mailer->send($this, $this->failedRecipients);
69  }
70 
77  public function isSent() {
78  return $this->sent;
79  }
80 
87  public function getFailedRecipients() {
89  }
90 
91 }