Ejemplo n.º 1
0
 function setBody($body)
 {
     if(is_string($body)){
         $content_type = @$this->content_type;
         $this->body = stristr($content_type,'text/') ? str_replace(array("\r\n","\r"),"\n", $body) : $body;
         if($this->_attach_html_images && $content_type == 'text/html'){
             $Parser = new AkMailParser();
             $Parser->extractImagesIntoInlineParts($this);
         }
     }else{
         $this->body = $body;
     }
 }
Ejemplo n.º 2
0
 public function setBody($body)
 {
     if (is_string($body)) {
         $content_type = @$this->content_type;
         $this->body = stristr($content_type, 'text/') ? str_replace(array("\r\n", "\r"), "\n", $body) : $body;
         if ($content_type == 'text/html') {
             $Parser = new AkMailParser();
             $Parser->applyCssStylesToTags($this);
             $Parser->addBlankTargetToLinks($this);
             if ($this->_attach_html_images) {
                 $Parser->extractImagesIntoInlineParts($this);
             }
         }
     } else {
         $this->body = $body;
     }
 }