I have succefully managed to complete this tutorial for a subscribe.php file linked to a page on my flash site.
<?
if(!empty($HTTP_POST_VARS[‘sender_mail’]) || !empty($HTTP_POST_VARS[‘sender_message’]) || !empty($HTTP_POST_VARS[‘sender_subject’]) || !empty($HTTP_POST_VARS[‘sender_name’]))
{
$to = “subscribe @ address”;
$subject = stripslashes($HTTP_POST_VARS[‘sender_subject’]);
$body = stripslashes($HTTP_POST_VARS[‘sender_message’]);
$body .= "
";
$body .= “Mail sent by: " . $HTTP_POST_VARS[‘sender_name’] . " <” . $HTTP_POST_VARS[‘sender_mail’] . ">
";
$header = “From: " . $HTTP_POST_VARS[‘sender_mail’] . " <” . $HTTP_POST_VARS[‘sender_mail’] . ">
";
$header .= “Reply-To: " . $HTTP_POST_VARS[‘sender_mail’] . " <” . $HTTP_POST_VARS[‘sender_mail’] . ">
";
$header .= “X-Mailer: PHP/” . phpversion() . "
";
$header .= “X-Priority: 1”;
if(@mail($to, $subject, $body, $header))
{
echo “output=sent”;
} else {
echo “output=error”;
}
} else {
echo “output=error”;
}
?>
How and where would I be able to add some code to also send an automated “thank you for your subscription” with standard text in the body and a URL to for those who wish to unsubscribe? All coming from the same e-mail account as the TO:subscribe@e-mailaddress above?
Any help or pointers would be greatly appriciated.
Thanks
Sany