Jump to content


Photo

Gmail,Yahoo ect.. Blocks mail() function


  • Please log in to reply
5 replies to this topic

#1 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 18 July 2006 - 06:23 PM

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?
Dont Piss me Off today

#2 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 18 July 2006 - 06:42 PM

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?
"Confidence in the face of risk."

#3 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 18 July 2006 - 06:49 PM

<?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>

Dont Piss me Off today

#4 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 18 July 2006 - 06:52 PM

heres my register validation codes also:

<?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>
");
}
?>

Dont Piss me Off today

#5 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 19 July 2006 - 02:04 AM

bump
Dont Piss me Off today

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 July 2006 - 03:03 AM

look up the mail function ok look for headers ok.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users