Send HTML email
Posted in PHP, on January 27, 2012 at 06:52
function email_send($email, $subject, $message) {
    $from = 'test@test.com';
    $to = $email;
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8'. "\r\n";
    $headers .= 'To: '.$to."\r\n";
    $headers .= 'From: '.$from."\r\n";
    $headers .= 'Reply-To: '.$from."\r\n";

    $message = '<html><body>'.$message.'</body></html>';

    if (mail($to, $subject, $message, $headers)) 
    	return true;
    else
      return false; 
}

Share this code

| More

Use the link below to share the code:
HTML
BBCode