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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -