Page 1 of 1
How to avoid being considered as a "spammer"?!
Posted: Tue Apr 25, 2006 4:54 am
by moh
Hi all!
I use a nice php script to manage my mailing list .. but unfortunately, many free email providers consider my emails as spam and redirect messages to the BULK folder.
Ok, I am not a spammer

and I need to send my members mass emails .. I thought of asking everybody to add my email address to their addressbook .. but I am sure it wont be easy to get them the message !
If this topic already discussed, please let me know the url.
otherwise, any solutions please ?

Posted: Tue Apr 25, 2006 5:29 am
by matthijs
As far as I understand it depends (at least partly) on how the mail is send. So if you would post some code, people here could look at it and see if anything's wrong. For example, I think that sending mass mail as bcc could be considered as "spam" looking. Often, using a solid mail class like for example phpmailer is a good option.
Posted: Tue Apr 25, 2006 6:22 am
by moh
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Many thanks matthijs fro your reply
Actually i didn't write the code. I am just using a free one..
but anyway, I looked at the code .. it uses the mail() function in a loop to send one email a time .
I quote a part of the code ( I know, might be useless )
Code: Select all
function admin_send_msg() {
// Sends the message to all subscribers on the list.
global $list_name, $list_file, $owner_email;
set_time_limit(0);
$subject = stripslashes($GLOBALS[subject]);
$message = stripslashes($GLOBALS[message]);
$subject = str_replace("%%", "\"", $subject);
$message = str_replace("%%", "\"", $message);
$headers = "From: \"$list_name\" <$owner_email>\r\nReply-To: $owner_email\r\nX-Sender: $owner_email\r\nX-UnsubscribeURL: http://$GLOBALS[HTTP_HOST]$GLOBALS[SCRIPT_NAME]\r\nX-Mailer: PHPMailList V$GLOBALS[version] http://php.warpedweb.net/\r\nX-AntiSpam: PHPMailList did not send you this email, review below for sender info.\r\nX-AntiSpam: Sent by $GLOBALS[REMOTE_ADDR]\r\n";
if ($GLOBALS[SERVER_ADMIN]) $headers .= "X-AntiSpam: Server Administrator $GLOBALS[SERVER_ADMIN]\r\n";
if ($GLOBALS['use_sig'] == "on") $message .= $GLOBALS['sig'];
$sucess_count = 0;
$fail_count = 0;
$addresses = @file($list_file) or die("<center><b>The list data file could not be opened.</b><br>Check the path and permissions.</center>");
$addresses[] = $owner_email;
set_time_limit(0);
foreach ($addresses as $email) {
$email = trim($email);
if (mail($email, $subject, $message, $headers)) $sucess_count++;
else $fail_count++;
}
echo "<h3 align=\"center\">Your message was sucessfully sent to $sucess_count addresses.</h3><h4 align=\"center\">There was $fail_count unsucessfully sent.</h4>";
}
Here where I got the script from ..
http://download.php.warpedweb.net/win/maillist.zip
Thanks ,
Moh
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]