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 = '[email protected]';
$headers = "From: XXX\r\n" . "X-Mailer: php";
if(mail($to, $subject, $message, $headers));
{
......so and so
}

 

Much appreciation.

 

Ainoy

Link to comment
https://forums.phpfreaks.com/topic/92473-php-mail/
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
https://forums.phpfreaks.com/topic/92473-php-mail/#findComment-473764
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.