Images in email problem
Posted on
16th Feb 2014 07:03 pm by
admin
I found this script for sending emails, it works but if the email has <img src="image.jpg"/> it will send this <img src="image.jpg"> < I tried to replace < > < with the right characters but it doesn't work. Any suggestions?
Code: <?php
/* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
Did you know?Explore Trending and Topic pages for more stories like this.
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$slashes= stripslashes($message);
/* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */
if (!preg_match("/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/", $email)) {
echo "<h4>Invalid email address</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
} elseif ($subject == "") {
echo "<h4>No subject</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
}
/* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
elseif (mail($email,$subject,$slashes)) {
echo "<h4>Thank you for sending email</h4>";
} else {
echo "<h4>Can't send email to $email</h4>";
}
?>
No comments posted yet
Your Answer:
Login to answer
232
13
Other forums
unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error
how to populate a drop down box
Hi buddies!
PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar)
is
begin
DOWNLO
please help
HTML Code:
Code: <span id="ctl00"><span>
Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.
Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.
Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but
Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:
Code: $modifiedData = array(
mail() problem
Hi Guys,
I've set up a contact email form. It sends the information fine, but it sends it to
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h
j1inmis Ouput layout changes
Hi,
Can anybody tell how can j1inmis output layout can be changed so that vendor names ge