Monday, August 5, 2013

Send HTML Email in PHP

ini_set("SMTP","[YOUR-EMAIL-SERVER-ADDRESS]");  // this line 184 for me  

$to      = '[YOUR-TO-EMAIL-ACCOUNT]';
$subject = 'This is the subject line';
$message = '

Hello World!


'; $message .=''; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= 'From: <from@example.com>' . "\r\n"; $headers .= 'Cc: cc@example.com' . "\r\n"; mail($to, $subject, $message, $headers);

No comments:

Post a Comment