473,769 Members | 3,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP mail being marked as spam

I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.

I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: cm*@cms.merus.c o.uk
Return-Path: cm*@cms.merus.c o.uk
Reply-To: cm*@cms.merus.c o.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>

I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.
Sep 1 '08 #1
5 3247
Gordon wrote:
I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.

I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: cm*@cms.merus.c o.uk
Return-Path: cm*@cms.merus.c o.uk
Reply-To: cm*@cms.merus.c o.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>

I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.
Among other things, ALWAYS specify the line end characters. Do not just
continue strings on separate lines and hope the browser has inserted the
correct characters!

Additionally, talk to your sysadmins and find out what they have set up
to detect for spam.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 1 '08 #2
Hotmail also spammed it.

Is it possible that it's because the received from server is nothing to do
with the 'from' address?

Just a stab in the dark: do you have an spf record to show that your server
can send on behalf of your domain name.
http://en.wikipedia.org/wiki/Sender_Policy_Framework
"Gordon" <go**********@n tlworld.comwrot e in message
news:32******** *************** ***********@m73 g2000hsh.google groups.com...
I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.

I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: cm*@cms.merus.c o.uk
Return-Path: cm*@cms.merus.c o.uk
Reply-To: cm*@cms.merus.c o.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>

I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.

Sep 1 '08 #3
Michael Vilain wrote:
In article
<32************ *************** *******@m73g200 0hsh.googlegrou ps.com>,
Gordon <go**********@n tlworld.comwrot e:
>I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.

I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitle d Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: cm*@cms.merus.c o.uk
Return-Path: cm*@cms.merus.c o.uk
Reply-To: cm*@cms.merus.c o.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>

I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.

If an ISP is flagging your email as spam, there's not much you can do to
fix that. Usually this is done based on the email history of the IP
address that's sending the emails. For something like SPAMCOP where
people actually report spammers to the service, the list is dynamic.
For Yahoo, it's up to them whatever method they use--baysian filters,
phase-of-the-moon, or the fact that your ISP won't get rid of spammers.

According to senderbase.org, your mail host has a good record of
non-spamming activity:

http://www.senderbase.org/senderbase...h_string=62.12
8.135.54

But the content of the message may look spammy to the baysian filters.
Stuff like the "From" and "Return-path" and "Reply" not matching as well
as the body containing HTML or attachments might trigger the filters.
There's nothing you can do about this except make the email as
transparent as possible. NO HTML, attachments, embedded pictures, and
good headers.
Actually, rbl's are now among the lesser used methods of detecting spam.
Sure, they're used - but header checking and message parsing end up
catching much of the spam.

Ensuring the headers are correct is a good first step. If your message
is otherwise not spam, that should get you to most of your users.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 2 '08 #4
On Sep 1, 3:46 pm, "Joe Butler" <ffffh.no.s...@ hotmail-spammers-
paradise.comwro te:
Hotmail also spammed it.

Is it possible that it's because the received from server is nothing to do
with the 'from' address?

Just a stab in the dark: do you have an spf record to show that your server
can send on behalf of your domain name.http://en.wikipedia.org/wiki/Sender_Policy_Framework

"Gordon" <gordon.mc...@n tlworld.comwrot e in message

news:32******** *************** ***********@m73 g2000hsh.google groups.com...
I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.
I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: c...@cms.merus. co.uk
Return-Path: c...@cms.merus. co.uk
Reply-To: c...@cms.merus. co.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>
I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.
GMail doesn't seem to mark it as spam.

I don't think it's the return path that's triggering the spam filters,
because it still gets marked as spam if From is set to be the same as
the server mentioned in the return path. I've emailed our IT
department about the filtering used, but they've not gotten back to
me, and they're not much help when it comes to problems that can't be
solved by turning it off and on again.
Sep 2 '08 #5
Do the headers of (unrelated) mails that do get thru to your internal mail
have headers that give a clue to what anti-spam system is in use. With that
info, you might be able to tweak things to work.

Also, was the 'from address' an actual mailbox on the other server, or was
it just ra****@otherser ver-hosts.com - becuase if it doesn't exist, it might
get dropped by your internal server.

And you are saying your internal server is marking it as spam, but you are
also saying it's not getting thru. So, how do you know it is marking it as
spam? Just because yahoo is?

"Gordon" <go**********@n tlworld.comwrot e in message
news:62******** *************** ***********@y21 g2000hsf.google groups.com...
On Sep 1, 3:46 pm, "Joe Butler" <ffffh.no.s...@ hotmail-spammers-
paradise.comwro te:
>Hotmail also spammed it.

Is it possible that it's because the received from server is nothing to
do
with the 'from' address?

Just a stab in the dark: do you have an spf record to show that your
server
can send on behalf of your domain
name.http://en.wikipedia.org/wiki/Sender_Policy_Framework

"Gordon" <gordon.mc...@n tlworld.comwrot e in message

news:32******* *************** ************@m7 3g2000hsh.googl egroups.com...
I'm working on a reset password script for my CMS, that will generate
a random password and email it to a user when they request one. The
problem I am having is that the mails being sent out are beign marked
as spam by our internal mail system and never reaching users'
inboxes. I've also discovered that Yahoo Mail considers these mails
to be spam, but it moves them to the spam folder instead of just
dropping them.
I wrote a simple mail script for testing purposes at http :// cms .
merus . co . uk / mailtest . php (remove whitespace for correct URL)
in an attempt to figure it out and have been using it to send myself
messages to my yahoo inbox in an attempt to figure out why they are
being marked as spam. The script source code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitl ed Document</title>
</head>
<body>
<form id="form1" method="post" action="">
<p>
<label for="to">To</label>
<input type="text" name="to" id="to" />
</p>
<p>
<label for="subj">Subj ect</label>
<input type="text" name="subj" id="subj" />
</p>
<p>
<label for="msg">Messa ge</label>
<textarea name="msg" cols="60" rows="8" id="msg"></textarea>
</p>
<p>
<label for="Submit">Su bmit</label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>
<?php
$headers = 'From: c...@cms.merus. co.uk
Return-Path: c...@cms.merus. co.uk
Reply-To: c...@cms.merus. co.uk
X-Mailer: PHP '.phpversion ().'
';
if ($_POST)
{
var_dump (mail ($_POST ['to'], $_POST ['subj'], $_POST ['msg'],
$headers));
}
?>
I've examined the headers that Yahoo sees with the view full headers
feature, but nothing that would obviously get the message flagged as
spam came up, though the X-Mailer header seems to be missing. If
anyone else can take a look at this and provide some helpful insight
I'd appreciate it.

GMail doesn't seem to mark it as spam.

I don't think it's the return path that's triggering the spam filters,
because it still gets marked as spam if From is set to be the same as
the server mentioned in the return path. I've emailed our IT
department about the filtering used, but they've not gotten back to
me, and they're not much help when it comes to problems that can't be
solved by turning it off and on again.

Sep 2 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1747
by: praba kar | last post by:
Dear All, Is it possible to send a message as a mail with out smtplib module? If you find out any module for mail sending(without smtplib) kindly mail me. regards Prabahar
11
1818
by: Nigel J. Andrews | last post by:
Marc, I'd be interested in seeing the updated stats for this bought of virus transmission we're going through. Yesterday you had almost 1 for 1 valid email. By then I think I was getting about 3-4 per valid email but since then it's sky rocketed and it looks more like 30+ per 1 valid message. I'd just be interested if that's the same others are seeing since I believe the virus picks up my email address from the messages sent to the...
4
6131
by: k.visube | last post by:
In my ASP application,i need to send a formatted text mail (i.e with newline characters). here in my application i used a function in javascript which construts the mail body sample snippet strbody=strbody +"dear customer,\n"; strbody=strbody +"we are glad to see ur response\n"; strbody=strbody +"we will make the needful thing as early as possible\n";
10
1678
by: Newbie | last post by:
Hi all, I'm looking for a way to send newsletter to my subscribers (1000+ in total). I've managed to do it using .NET system.net.mail.smtpclient's sendAsync. I read the email addresses from a table (in a MSSQL DB) using sqldatareader, then looping through it to read each email address and add it to the instance's 'TO' property (e.g: mail.to.add(r.item("email_addr")) ). I test run it with my own addresses to see how it works. And...
7
487
by: Ed Bitzer | last post by:
Would like to use this namespace but Visual Studio.Net 2003 cannot locate and I do not see it listed under Project | Add Reference. Was this not included this older version of VB.Net or Visual Studio? Is there source code that I can download. I'm retired, VB.Net is a hobby, and I would like to write a program to send a short weekly message automatically (scheduled) to a dozen tennis players each week. Found code snippets but all depend...
10
3963
by: Frank | last post by:
Hi, I am hoping to find out the differences between the System.Net.Mail and System.Web.Mail. Can some nice folks post the differences; or some urls which show the differences? Great Thanks Frank
3
3298
uranuskid
by: uranuskid | last post by:
Hey folks, I was going to include a contact form on my website. Well, in the first place that seemed an easy thing to do with a form that prompts a PHP file validating the input vaiables and using it's mail () function to send the mail. However, as I got more into that topic I realized that one should be really concerned about the validation part to prevent spam abuse. There are shiploads of 'mail scripts' available with each of them has...
4
3149
by: Jack | last post by:
Hi guys, I am writing a simple script that sends an email to a user using mail(). The problem is when the mail is received it is marked as phishing. I am wondering if there is a way to fix this issue. Thanks
1
1145
by: Aaron \Castironpi\ Brady | last post by:
Hello all, I'm hesitating to change news readers because I like Google's interface. In the interests of discussion, I'd make better contributions without it, if only because it's a known spam source, but its reader format beats the alternatives I've seen. I checked out the 'nntplib' module to see if some hybrid with Thunderbird and GMane, for example, would be possible. I don't think it would be that hard, but before I put in the...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.