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 Like 15 Dislike
Previous forums Next forums
Other forums

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???
<tr>
<t

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Taking an HTML form and a PHP program and making it into one working file.
Hello,

So I would like to display everything INSIDE a specific directory. In other words, I

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash