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:
$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

set xml path in flash when xml created in memorystream and webrequest
i am creating an xml file using memory stream and i want to load this xml file into the flash on cli

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

How to read posted binary data from a mobile device and post it to a web server?
Here is the senario...

I have a mobile device (MD) that posts binary data to a Web Server (WS

passing data from one page to another
hey guys
i have the follwoing code to get information from one page and place on another:

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

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