Send emails from PHP to INBOX and not the spam folder.

phpfail

Regular Member
Joined
Aug 21, 2011
Messages
236
Reaction score
107
Okay now I use this on a few of my email collecting sites, it works for sending emails to the inbox for gmail and yahoo. I've tested with multiple ip addresses and multiple emails, and I can not get it to send to the spam folder, it always shows up in the inbox.

If it sends to the spam folder for you, please let me know.


Form where user enters there email
Code:
<form action="send.php" method="POST">
<input type="text" name="email" value="Enter your Email">
<input type="submit" name="submit" value="Continue">
</form>


Code for send.php
PHP:
<?php
$email = $_POST['email'];

// edit below
$from = "this is the name it says the email is from";
$fromemail = "this is the email that is says the message is from";
$reply = "this is the email that receives the replies";

$subject = "SUBJECT HERE";
$body = "BODY HERE";

// send code, do not edit unless you know what your doing
$header .= "Reply-To: Support <$reply>\r\n"; 
    $header .= "Return-Path: Support <$reply>\r\n"; 
    $header .= "From: $from <$fromemail>\r\n"; 
    $header .= "Organization: getFreexBoxLiveCodes\r\n"; 
    $header .= "Content-Type: text/plain\r\n"; 
 
    mail("$email", "$subject", "$body", $header);
?>

Hope people get some use out of this, I know I have!
 
always goes to spam for me, checked on yahoo
 
it depends on hosting, has nothing to do with php code....
 
- Use Gmail / Hotmail SMTP.
- Make a database of accounts
- Make a Cron job and send the emails while rotating the accounts and SMTPs for each account.

P.S : This is just an Idea I had a while ago. I still haven't got time to test it.

Good luck
 
it depends on hosting, has nothing to do with php code....

I am no expert here on this matter but I sent the exact same email from php to email using another script and it went to inbox using the same server.


PS: I dont mean to sound ungrateful for his share just reporting back my experience with it.
 
It has long been looking for a similar script - thank you.
 
Back
Top