View unanswered posts | View active topics It is currently Sun Jan 22, 2017 12:37 pm

Reply to topic  [ 1 post ] 
 My mail is treated as spam. Kindly help 
Author Message
Junior Member

Joined: Thu Dec 10, 2009 5:06 am
Posts: 1
Post My mail is treated as spam. Kindly help
I'm accepting some registration and mailing to the user about registration. But the mail sent is being treated as spam in gmail (checked only in that). I've changed my domain name to in the below code. I dont own or have rights to or the below code is not from

font-family:Verdana, Georgia, Arial;
$con=mysql_connect('localhost', 'username', 'password');
if (!$con){
   die('Connection error... Try Again Later');

$count = mysql_query("SELECT * FROM idCount");
$row = mysql_fetch_assoc($count);
$count=(int) $row['count'];

if($count<10) $id.="000".$count;
else if($count<100) $id.="00".$count;
else if($count<1000) $id.="0".$count;
else $id.=$count;
$username = $_POST['usrname'];
$pars = $_POST['parsword'];
$name = $_POST['name'];
$email = $_POST['email'];
$ph = $_POST['ph'];
$address = $_POST['address'];
$year = $_POST['year'];
$college = $_POST['college'];
$passsalt=modified password;
mysql_query("UPDATE idCount SET count='$count' where count='$preCount'");
echo "Your ID='$id'.
$sql="INSERT INTO verification (id,username,passSalt, name, email, phone, year,

college, address, rkey)


if (!mysql_query($sql))
die('Error: ' . mysql_error());
$to  = $email; // note the comma

// subject
$subject = 'mySite 2010 Registration';

// message
$message = "
<body bgcolor='#000000' text='#ffffff' LINK='#ffffff' VLINK='#B6B6B6' ALINK='#B6B6B6'

   <img src='' alt='mySite 2010' width='800' height='200'>


Dear $name,
   You have been registered in <a

href=''></a> with this e-mail ($email) and the

following details

      <tr><td>Phone no</td><td>$ph</td></tr>
To confirm this e-mail and registration kindly click (or copy paste) below

<a href='$key'>$key </a>

If the e-mail is by some mistake, kidle click (or copy paste) below link
<a href='$key'>$key </a>


// To send HTML mail, the Content-type header must be set
$headers  = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";

// Additional headers
$headers .= "From: mySite 2010 <> \r\n";

// Mail it
mail($to, $subject, $message, $headers,"");

echo "Registration Successfull... Verify Your <b>E-mail</b> to complete Registration....";


Thu Dec 10, 2009 5:08 am
Report this post
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.