示例#1
0
 /**
  *
  */
 private function generateMessage()
 {
     //Reply to
     if ($this->config["defaults"]["reply_to"] && is_null($this->email->getReplyTo())) {
         $this->message->addReplyTo($this->config["defaults"]["reply_to"], $this->config["defaults"]["reply_to_name"]);
     }
     /*
      * Produce a list of template vars
      */
     $this->templateVars = array_merge($this->config["template_vars"], $this->email->toArray());
     //If not layout, use default
     if (!$this->email->getHtmlLayoutName()) {
         $this->email->setHtmlLayoutName($this->config["defaults"]["html_layout_name"]);
     }
     /*
      * If not sender, use default
      */
     if (!is_null($this->email->getFrom())) {
         $this->message->setFrom($this->email->getFrom(), $this->email->getFromName());
     } else {
         $this->message->setFrom($this->config["defaults"]["from_email"], $this->config["defaults"]["from_name"]);
     }
     /*
      * Force the mailing as header if we have a mailing
      */
     if (!is_null($this->mailing)) {
         $this->message->getHeaders()->addHeaderLine('X-Mailjet-Campaign', DEBRANOVA_HOST . '-mailing-' . $this->mailing->getId());
     }
 }
示例#2
0
 /**
  *
  */
 private function generateMessage()
 {
     //Reply to
     if ($this->config["defaults"]["reply_to"] && is_null($this->email->getReplyTo())) {
         $this->message->addReplyTo($this->config["defaults"]["reply_to"], $this->config["defaults"]["reply_to_name"]);
     }
     /*
      * Produce a list of template vars
      */
     $this->templateVars = array_merge($this->config["template_vars"], $this->email->toArray());
     //If not layout, use default
     if (!$this->email->getHtmlLayoutName()) {
         $this->email->setHtmlLayoutName($this->config["defaults"]["html_layout_name"]);
     }
     /*
      * If not sender, use default
      */
     if (!is_null($this->email->getFrom())) {
         $this->message->setFrom($this->email->getFrom(), $this->email->getFromName());
     } else {
         $this->message->setFrom($this->config["defaults"]["from_email"], $this->config["defaults"]["from_name"]);
     }
 }