$headers .= 'From:  <donotreply@maysite.com>' . "\r\n";
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'Return-Path:<donotreply@maysite.com>\r\n';

mail($to, $subject, $messageEmail, $headers);

_____
what i need to add to (recieved my email generated, php mail() fuction) in inbox, because it always landed to spam

Recommended Answers

This isn't going to be your PHP code causing the filtering to spam. If your domain doesn't already have one, you want to set up an SPF record which states the server which this script is on is allowed to send mail. I don't know if maysite.com is one you've …

Jump to Post

All 3 Replies

This isn't going to be your PHP code causing the filtering to spam. If your domain doesn't already have one, you want to set up an SPF record which states the server which this script is on is allowed to send mail. I don't know if maysite.com is one you've used just as an example but that domain doesn't have an SPF record.

You'll also want to make sure the content of the mail isn't spam-like.

Captcha isn't going to stop the mail being marked as spam. That just reduces the chance that the form is going to be abused.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.