Hi,
I'm trying to include an image in the $autoreply of my php. When people fill out my html form and click submit, it triggers the php script, and they are sent an email back automatically. That itself works fine, but I want a signature (the image) down the bottom of the email.
Is there a way of doing this? This is my php at the moment...
I'm trying to include an image in the $autoreply of my php. When people fill out my html form and click submit, it triggers the php script, and they are sent an email back automatically. That itself works fine, but I want a signature (the image) down the bottom of the email.
Is there a way of doing this? This is my php at the moment...
Code:
<?php
$to = "me@email.com.au" ;
$from = $_REQUEST['email'] ;
$name = $_REQUEST['firstName'] ;
$headers = "From: $from";
$subject = "Contact Form";
$fields = array();
$fields{"firstName"} = "First Name";
$fields{"lastName"} = "Last Name";
$fields{"email"} = "Email";
$fields{"phone"} = "Phone";
$fields{"subject"} = "Subject";
$fields{"question"} = "Question";
$body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From: Me <me@email.com.au>";
$subject2 = "Thank you for contacting me";
$autoreply = "Thank you for the enquiry.";
if($from == '') {print "You have not entered an email, please go back and try again";}
else {
if($name == '') {print "You have not entered a name, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: http://www.website.com.au/index.html" );}
else
{print "I encountered an error sending your mail, please notify me at me@email.com.au"; }
}
}
?>