Send proper html message to gmail using php? -
we have simple php class, sends messages via php mail
$message = file_get_contents($this->message_file); $this->message = base64_encode($message); foreach($this->to $to){ $code .= ' $to = "'.$to.'"; $headers = "mime-version: 1.0" . "\n"; $headers .= "content-type: text/html; charset=utf-8" . "\n"; $headers .= "from: '. $this->from .' " . "\n"; $subject = "test message ".$_server[\'server_name\']; mail($to, $subject, base64_decode("'.$this->message.'"), $headers); ';
it worked fine until had send proper html page css, images , other stuff. gmail doesn't show correct (no images, no css). how can resolve , format message in proper way google mail display right?
Comments
Post a Comment