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

ALV List display - header width adjust
Hi,

I am using REUSE_ALV_LIST_DISPLAY for my ALV display.The width of the ALV varies for

Serial number of exernal hard disk/Thumbdrive
Hi guys, I am new tio java networking concepts.Please tel me how to get Serial number of exernal

Convert Binary String to Decimal
Trying to Get:
Decimal: 305419896

Out of:
Binary String: xV4

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)

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Limiting checkboxes?
Hi guys,

I have this code: Code: if(isset($_POST['selected'])) {
foreach($_POST['selec

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

Fetching array then reversing it
Hi, I have a simple problem, I'll try to explain it as best I can:
News entries in my database ar

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