mail() problem
Posted on
16th Feb 2014 07:03 pm by
admin
Hi Guys,
I've set up a contact email form. It sends the information fine, but it sends it to the junk folder.
If I just use this command:
Did you know?Explore Trending and Topic pages for more stories like this.
$headers = "MIME-Version: 1.0 n";
It will send it to my inbox folder. If I use any other command after it in the $headers variable it will then send it to my junk folder.
Here is the full code I'm using:
Code: $to = "notanotherperson@hotmail.com";
$subject = $title;
$message = "<html><body>";
$message .= "<div style='border: 1px #ccc solid; padding: 5px; width: 100%; text-align: center'>";
$message .= "<b>Message From ". $name ."</b></div><br />";
$message .= "<div style='border: 1px #ccc solid; padding: 10px'>";
$message .= "Dear Emma,<br /><br />";
$message .= "<span>".$mess."</span></div>";
$message .= "</body></html>";
$headers = 'MIME-Version: 1.0' . "n";
$headers .= "From: ".$name."<".$email.">n";
$headers .= "Reply-To: ".$name."<".$email.">n";
$headers .= "Return-Path: ".$name."<".$email.">n";
$headers .= "cc: ". $name . "<".$email.">n";
$headers .= "X-Mailer: Drupaln";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "n";
mail($to, $subject, $message, $headers);
Thanks
No comments posted yet
Your Answer:
Login to answer
232
15
Other forums
DATEDIFF Question
First time post, and of course it is a help question.
I am using a WP plug-in to display prev
Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.
str_replace help
Hey there,
I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean
=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim
How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor
Request for tunning the below query
Hi,
Can any one help me on the below query while improving the performance,
Best PHP Documentation generator
Hello guys!
I would like to hear from you what is the best PHP documentation generator. Perso
Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot
php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th