Jump to content

PHP Mail?


ainoy31

Recommended Posts

Hello-

I do not know if this is an php mail issue or not.  I am using the mail() in php to auto generate emails.  My question is that when I go and check my inbox say at Yahoo, the email that is sent goes straight to the Bulk folder not the main inbox.  Here is my code:

 

$name = $_POST['name'];
$email = $_POST['address'];
$subject = $_POST['subject'];
$message = "An inquiry from " . $name . ' ' . 'via' . ' ' . $email . "\n\n";
$message .= $_POST['message'];
$to = 'xxx@yahoo.com';
$headers = "From: XXX\r\n" . "X-Mailer: php";
if(mail($to, $subject, $message, $headers));
{
......so and so
}

 

Much appreciation.

 

Ainoy

Link to comment
Share on other sites

Yah man, this can be a number of things.

 

Your domain may be blacklisted, your bulk settings are picking up that it's PHP sending it and spam marking it, etc.

 

Try changing the header line to this.

$headers = 'From: XXX'."\r\n";

 

This MAY work if yahoo is bulding it because PHP is the identified X-mailer.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.