php - How to get my emails delivered to the inbox instead of the spam folder? -


i can try this:

$name       = @trim(stripslashes($_post['name']));  $from       = @trim(stripslashes($_post['email']));  $subject    = @trim(stripslashes($_post['subject']));  $message    = @trim(stripslashes($_post['message']));  $to         = 'email@email.com';//replace email  $headers   = array(); $headers[] = "mime-version: 1.0"; $headers[] = "content-type: text/plain; charset=iso-8859-1"; $headers[] = "from: {$name} <{$from}>"; $headers[] = "reply-to: <{$from}>"; $headers[] = "subject: {$subject}"; $headers[] = "x-mailer: php/".phpversion();  mail($to, $subject, $message, $headers); 

but time emails delivered spam.

any suggestion.

this have 2 reason in look:

some email service send mail spam when:

  • from header not equal domain example domain test.com header support@google.com.

  • and server ip in black list in server.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -