Jump to content

Gmail,Yahoo ect.. Blocks mail() function


scheols

Recommended Posts

Yes i made a email in my cpanel sent a email from my quick mail form 2 both my gmail acocunt and my email with my host.

i only recieved the email that i sent 2 my email i made with my host blah@myurl.com

how can i make it so it can send 2 peoples emails with out yahoo/gmail blocking it?
Link to comment
Share on other sites

I'm not sure I understand what you're saying.

can we see the code for your script that uses the mail() function?

chances are its either a setting w/ your hosts mail server or your domain name is black listed.  maybe just the format of your e-mail body (or subject line) makes it look like spam.  are they e-mails not showing up at gmail or are they in the spam folder?
Link to comment
Share on other sites

[code]
<?PHP

/*

+--------------------------------------------------------------------------

|  Fake Email Sender

+--------------------------------------------------------------------------

*/



//  When submit button is pressed

if (isset($_POST['submit']))

{



$remail = trim(strip_tags($_POST['remail']));

$femail = trim(strip_tags($_POST['femail']));

$subject = trim(strip_tags($_POST['subject']));

$message = trim(strip_tags($_POST['message']));

$headers = "From: $femail";



//  Check if all fields were filled in

if (empty($remail) || empty($femail) || empty($subject))

{

    echo '<script>alert("One or more fields was left empty.");</script>';

    echo '<script>history.back(1);</script>';

    exit();

}





$send = mail($remail, $subject, $message, $headers);



if ($send)

{

    echo "Email successfully sent!";

}

else

{

    echo "There was a problem while sending the email, please try again";

}



}



?>

<center>

<form method="post" action="<?= $_SERVER['PHP_SELF'] ?>" enctype="multipart/form-data">

<table border="0" cellpadding="0" cellspacing="2">

<tr>

    <td colspan="2"><center><b>Send A Fake Email</b></center></td>

</tr>

<tr>

    <td width="150px"><strong>Recipient Email:</strong></td>

    <td width="300px"><input name="remail" type="text" size="30"></td>

</tr>

<tr>

    <td width="150px"><strong>Your Fake Email:</strong></td>

    <td width="300px"><input name="femail" type="text" size="30" value="YourFakeEmail@Fake.com"></td>

</tr>

<tr>

    <td width="150px"><strong>Subject:</strong></td>

    <td width="300px"><input name="subject" type="text" size="30"></td>

</tr>

<tr>

    <td width="150px" valign="top"><strong>Message:</strong></td>

    <td width="300px"><textarea name="message" cols="50" rows="15"></textarea></td>

</tr>

<tr>

    <td colspan="2"><center><input name="submit" type="submit" value="Send Fake Email"></center></td>

</tr>



</table>

</form>

</center>
[/code]
Link to comment
Share on other sites

heres my register validation codes also:

[code=php:0]
<?php
ob_start();
include("database.php");

if($_POST['register']){
$username = $_POST['username'];
$password = $_POST['pass'];
$cpassword = $_POST['cpass'];
$email = $_POST['emai1'];

if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL){

echo "A Field was left blank.";
}else{
if($password != $cpassword){
echo "Passwords do not match";
}else{
$password =sha1(md5($password));

$checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
$checkname = mysql_num_rows($checkname);
$checkemail = mysql_query("SELECT email from users WHERE email='$email'");
$checkemail = mysql_num_rows($checkemail);
if($checkemail>0|$checkname>0){
echo "This User name or email is already in use";
}else{
$username = htmlspecialchars($username);
$password = htmlspecialchars($password);
$email = htmlspecialchars($email);
// But first, lets add a validation number.
  $valnum[1]="789764";
  $valnum[2]="876954687";
  $valnum[4]="54631155";
  $valnum[5]="87563879";
  $valnum[6]="789876546489646";
  $valnum[7]="847515845181";
  $valnum[8]="8485841845618485";
  $valnum[9]="945612105158151518515";
  $valnum[10]="32131251581485";
  $random = rand(1, count($valnum));
$userval = "$valnum[$random]";

$query = mysql_query("INSERT INTO users (username, password, email, val_num) VALUES('$username','$password','$email', '$userval')");
// inserts the information into the database.
mail("$email", "Please validate your account.", "Thank you for registering at YOURSITE. Please use the link below to validate your account.

Username: $username
Validation Code: $userval
To validate your account, visit: http://YOURSITE.com/validate.php?username={$_POST['username']}

If your username has spaces in it, you must replace them with %20");
echo "You have successfully registered! Please check your email for your validation link!";
}
}
}
}else{
echo ("
<center>
<form method=\"POST\">
Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br />
Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br />
Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br />
Email: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"emai1\"> (Requires Validation)<br />
<input name=\"register\" type=\"submit\" value=\"Register\">
</form>
</center>
");
}
?>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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