Hello;

Our company newsletter is not getting to some of our subscribers.

My guess is it is ending up in junk mail folders.

We have a section on relationship tips and I am concerned some of the content in this section could be triggering spam filters.

I am working on a script that runs SpamAssassin on an uploaded text version of the letter so I can scan the content.

What I would love is a report flagging content that might be causing a problem (and the overall score) so I can send the letter back to the creative team showing them the exact content that needs to be rewritten/removed.

Below is the script I have started. I am not sure what the spamassissin report should look like, but what I am getting back can't be it (It just gives me the version of spam assassin and the name of the file).

I am not experienced in Perl so it could easily be a problem with my code.

Is there any easier way to get a report on an email?

What is a good online reference for understanding the SpamAssassin API?

Thanks,

Luke

#!/Perl/bin/perl
use strict;
use CGI qw(:standard);
use Mail::SpamAssassin;

# get a parameter from a form
my $fulltext = param('fulltext') || 'no text supplied';

#create an array from the text in the file
my @lines = split(/\n/, $fulltext);

#create a test
my $spamtest = Mail::SpamAssassin->new( );

#create a new mail object
my $mail = $spamtest->parse([EMAIL PROTECTED]);

#create a status object
my $status = $spamtest->check($mail);

# output a document
print header( ), start_html("Spam Assasin Report"),
        p("SpamAssassin Report: ", tt(escapeHTML($status->rewrite_mail())),
        end_html( );


Enrich your life at Yahoo! Canada Finance

Reply via email to