PHP Snippet 1:
<?php
$webmaster_email = "[email protected]";
$success_page = "thankyoucontact.html";
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];
$msg =
"You have received a message from " . $name . "\r\n\n" .
"Subject: " . $subject . "\r\n\n" .
"Message: " . $message . "\r\n\n" .
"Name: " . $name . "\r\n" .
"Phone: " . $phone . "\r\n" .
"Email: " . $email . "\r\n\n\n\n" .
"DISCLAIMER:\r\n\nThis e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.";
echo "The message contains: $msg";
exit;
// mail($webmaster_email, "Contact Form Request", $msg);
// header("Location: $success_page");
?>
PHP Snippet 2:
<?php
mail('[email protected]', "testing", "testing.\nDoes this arrive?");
?>
PHP Snippet 3:
mail -s "Testing mail" [email protected] <<< 'Testing. Is this body visible?'
PHP Snippet 4:
$from ='[email protected]';
$headers = "From:" . $from . "\r\n";
$headers .= "Content-type: text/plain; charset=UTF-8" . "\r\n";
@mail($webmaster_email,$subject,$message,$headers);
PHP Snippet 5:
Message: $msg