/**
  * Constructs a new ezcMailDigest with the mail $mail.
  *
  * @param ezcMail $mail
  */
 public function __construct(ezcMail $mail)
 {
     parent::__construct();
     $this->mail = $mail;
     $this->setHeader('Content-Type', 'message/rfc822');
     $this->setHeader('Content-Disposition', 'inline');
 }
Exemple #2
0
 /**
  * Constructs a new TextPart with the given $text, $charset and $encoding.
  *
  * OriginalCharset is only used when parsing mail. Parsed mail will always
  * be converted to UTF-8 in this case $originalCharset will hold the
  * charset before it was converted.
  *
  * @param string $text
  * @param string $charset
  * @param string $encoding
  * @param string $originalCharset
  */
 public function __construct($text, $charset = "us-ascii", $encoding = ezcMail::EIGHT_BIT, $originalCharset = 'us-ascii')
 {
     parent::__construct();
     $this->text = $text;
     $this->charset = $charset;
     $this->encoding = $encoding;
     $this->subType = 'plain';
     // We need to set this directly in the array as it's a read-only property.
     $this->properties['originalCharset'] = $originalCharset;
 }
Exemple #3
0
 /**
  * Constructs a new attachment with $fileName.
  *
  * @param string $fileName
  */
 public function __construct($fileName)
 {
     parent::__construct();
     // initialize properties that may be touched automatically
     // this is to avoid notices
     $this->properties['contentType'] = null;
     $this->properties['mimeType'] = null;
     $this->properties['dispositionType'] = null;
     $this->properties['contentId'] = null;
     $this->fileName = $fileName;
 }
 /**
  * Constructs a new ezcMailMultipart with the parts $parts.
  *
  * Subclasses typically accept an arbitrary number of parts in the
  * constructor and pass them along using func_get_args().
  *
  * $parts should be of the format array(array(ezcMailPart)|ezcMailPart)
  *
  * Subclasses must call this method in the constructor.
  * @param array $parts
  */
 public function __construct(array $parts)
 {
     parent::__construct();
     $this->noMimeMessage = self::DEFAULT_NO_MIME_MESSAGE;
     $this->boundary = $this->generateBoundary();
     $this->setHeader("Content-Type", 'multipart/' . $this->multipartType() . '; ' . 'boundary="' . $this->boundary . '"');
     foreach ($parts as $part) {
         if ($part instanceof ezcMailPart) {
             $this->parts[] = $part;
         } elseif (is_array($part)) {
             foreach ($part as $array_part) {
                 if ($array_part instanceof ezcMailPart) {
                     $this->parts[] = $array_part;
                 }
             }
         }
     }
 }
Exemple #5
0
 /**
  * Constructs an empty ezcMail object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->properties['from'] = null;
     $this->properties['to'] = array();
     $this->properties['cc'] = array();
     $this->properties['bcc'] = array();
     $this->properties['subject'] = null;
     $this->properties['subjectCharset'] = 'us-ascii';
     $this->properties['body'] = null;
     $this->properties['messageId'] = null;
     $this->properties['returnPath'] = null;
 }
Exemple #6
0
 /**
  * Constructs an empty ezcMail object.
  */
 public function __construct(ezcMailOptions $options = null)
 {
     parent::__construct();
     $this->properties['from'] = null;
     $this->properties['to'] = array();
     $this->properties['cc'] = array();
     $this->properties['bcc'] = array();
     $this->properties['subject'] = null;
     $this->properties['subjectCharset'] = 'us-ascii';
     $this->properties['body'] = null;
     $this->properties['messageId'] = null;
     $this->properties['returnPath'] = null;
     if ($options === null) {
         $options = new ezcMailOptions();
     }
     $this->options = $options;
 }
Exemple #7
0
 /**
  * Constructs a new DeliveryStatus part.
  */
 public function __construct()
 {
     $this->message = new ezcMailHeadersHolder();
     $this->recipients = new ArrayObject();
     parent::__construct();
 }