Jump to content

[SOLVED] sending email that will not be filtered as junk


jas4

Recommended Posts

I'm wanting to write a piece of code that will send an email to a number of different email address's  after getting the email address's out of an mysql query.

 

I'm using a while loop to get around every email address, and I want the email address to have html in it.

 

the script I wrote works only for some email address's, for email address's like hotmail and outlook express it gets filtered out by the junk filter. This is the code I've got just now:

 

  
  while ($row = mysql_fetch_array($getEmail)){
  $email =  $row['memail'];
  $rand = check_input(random_string('alnum',32));//the random key for every invite
  $inviteid = "inv".rand(1,100000000000000000);
  echo $email."<br>";
  $to = $email;
  $from = '[email protected]';
  $subject = 'invite';
  $message = "<a href='http://www.mysite.com>Click Here</a>";



//$headers = "From: " . $from . "\r\n";

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: " . $from . "\r\n";
$mailsent = mail($to, $subject, $message, $headers);
}

 

any suggestions for getting through the junk email filters?

 

thanks

Archived

This topic is now archived and is closed to further replies.

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