hi all, i know this is not related directly to a form with a click submit button.
but i am trying to include in php a script that will send an email when the page is loaded. i was given this code but it doesnt work, i think i forgot a step or something
<?php mail($to = "admin@clhmedia.com";
$subject = "new order";
$message = "you have a new order";
hi all, i know this is not related directly to a form with a click submit button.
but i am trying to include in php a script that will send an email when the page is loaded. i was given this code but it doesnt work, i think i forgot a step or something
<?php mail($to = "admin@clhmedia.com";
$subject = "new order";
$message = "you have a new order";
//mail headers
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"Admin\" <admin@clhmedia.com>\n";
$headers .= "Return-Path: admin@clhmedia.com\n";
$headers .= "Return-Receipt-To: admin@clhmedia.com\n";
mail($to,$subject,$message,$headers); ?>
anyways any help would be great thanks
Chris,
you have probably solved your problem by now, but I think the issue is in your first line.
It should be like this
<?php
$to = "admin@clhmedia.com";
$subject = "new order";
$message = "you have a new order";
Dave