Hi all, I am very new to Php and I have done some searching around and I cant find an answer to this. So I am hoping some kind person might be able to help me.
I have managed to get my auto reply working, but I want to be able to customize the actual email sent (fonts, colours, etc.) rather than just plain black and white text.
Here is my code so far:
<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "myemailhost.com";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name
Email: $sender
Subject: $contact_subject
Message: $contact_message
IP: $client_ip
From Industrial Placement Website";
$extra = "From: $sender
" . "Reply-To: $sender
" . "X-Mailer: PHP/" . phpversion();
if( mail( $receiver, "Flash Contact Form - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
// The Reply
$email = $_POST['email'];
$header = "myemail.com";
$subject = 'Submission'; // change subject
$message = 'This is a confirmation that we have recieved your message, and we will be in contact with you soon regarding your enquiry.
Thanks for your interest.
Bailey
'; // change text
mail($email, $subject, $message, 'From: '.$receiver.''); // send another one out
?>
I am trying to work out how I can customize my auto reply, but I am really struggling. Any help would be greatly appreciated.
Sliilvia