Jump to content

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


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 = 'myaddress@mydomain.com';
  $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

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.