Perl sendmail going to spam folders?

D

Duke of Hazard

I am using sendmail in a perl script to send a message to the email
address provided in a web form. The problem is that this message
always end up in the person's spam/bulk folder. I don't know what it
is about the sendmail that makes yahoo think it is spam. Below is my
code pasted below:

##################################

$mail_prog = '/usr/sbin/sendmail -t' ;

if ($email) {

open (MAIL, "|$mail_prog");
print MAIL "From: $r0\n";
print MAIL "To: $r0,$email\n";
print MAIL "Subject: Form results\n";

print MAIL "blah blah blah";

close (MAIL);

} # end of if statement
 
G

Gunnar Hjalmarsson

Duke said:
I am using sendmail in a perl script to send a message to the email
address provided in a web form. The problem is that this message
always end up in the person's spam/bulk folder. I don't know what
it is about the sendmail that makes yahoo think it is spam.

It has probably nothing to do with sendmail, even less with Perl, btw
(this is a Perl group), but rather with the source of the message.
You'd better ask that "the person" tries to find out the criteria used
for guessing that it's spam.
 
D

David Efflandt

I am using sendmail in a perl script to send a message to the email
address provided in a web form. The problem is that this message
always end up in the person's spam/bulk folder. I don't know what it
is about the sendmail that makes yahoo think it is spam. Below is my
code pasted below:

Undoubtedly nothing Perl specific.

For one thing, from RFC 2822:

A message consists of header fields (collectively called "the header
of the message") followed, optionally, by a body. The header is a
sequence of lines of characters with special syntax as defined in
this standard. The body is simply a sequence of characters that
follows the header and is separated from the header by an empty line
(i.e., a line with nothing preceding the CRLF).

You have no blank line (or double newline) between your headers and body.

It also may depend upon the IP and DNS of your server, how it identifies
itself, whether it follows the RFCs, and your body content (which ends up
as funky headers due to missing blank line).
 
T

Tintin

Duke of Hazard said:
I am using sendmail in a perl script to send a message to the email
address provided in a web form. The problem is that this message
always end up in the person's spam/bulk folder. I don't know what it
is about the sendmail that makes yahoo think it is spam. Below is my
code pasted below:

What makes you think it has anything to do with sendmail and I can't think
what relevance you think Perl is to this.

Spam filters work on any number of components of the email, the most
important (and obvious) being the subject and contents.

[snipped code]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top