www/public/subscribe.php
Jacob Heider c924e45114
v1.0.0 website
Signed-off-by: Jacob Heider <jacob@tea.xyz>
2022-05-03 21:00:43 -04:00

32 lines
614 B
PHP

<?php
## CONFIG ##
# LIST EMAIL ADDRESS
$recipient = "tom@anchorpointcollective.com";
# SUBJECT (Subscribe/Remove)
$subject = "Subscribe";
# RESULT PAGE
$location = "https://tea.xyz";
## FORM VALUES ##
# SENDER - WE ALSO USE THE RECIPIENT AS SENDER IN THIS SAMPLE
# DON'T INCLUDE UNFILTERED USER INPUT IN THE MAIL HEADER!
$sender = $recipient;
# MAIL BODY
$body .= "Email: ".$_REQUEST['Email']." \n";
# add more fields here if required
## SEND MESSGAE ##
mail( $recipient, $subject, $body, "From: $sender" ) or die ("Mail could not be sent.");
## SHOW RESULT PAGE ##
header( "Location: $location" );
?>