phpfail
Regular Member
- Aug 21, 2011
- 236
- 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 for send.php
Hope people get some use out of this, I know I have!
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!