never mind, i got an idea from another thread that lead me to MIME::Lite. a perl mod that helps get around sendmail. but now i have an other problem. when i go to send the message i can not use variables within the message text. so i made the message an attachment. i am making it a normal *.txt file (so that windows can read it). here is the code:
====
code
====
#!/usr/bin/perl
use MIME::Lite; #use the MIME::Lite Module
open (FILE, "</home/joe/mailfilter_logs/.mailfilter.log"); #open the filter log just for opening
@log = <FILE>; #put the filter log into the array seperated on the carrage
close (FILE); #close the log
foreach $log (@log) {
#print $log;
if ($log =~ /superdealmail.com/){ #for each line of the filter log see if @superdealmail.com is in that line
$counter++; #if so then add 1 to the variable $counter
print $log;
print $counter;
}
}
#$counter=($counter/2);
#next line: write over the file mailfilter_delete_count.txt or if not print that it can't
open (MAIL,">/home/joe/mailfilter_logs/mailfilter_delete_count.txt") || print "cant open the file";
#next line: add this line to the file
print MAIL "there were $counter emails sent by \"superdealmail.com\"\n that were deleted this week.";
close (MAIL); #close the file
#next line: setup MIME::Lite to use my smtp server to send out
MIME::Lite->send('smtp', "smtp.xxxxx.xxxx.net", Timeout=>60);
$msg = MIME::Lite->new( #setup the new message section
From =>'pandaroo2@xxx.net',
To =>'joes_box@xxx.net',
Subject =>'Helloooooo, nurse!',
Data=>'The attachment is the report from Joe\'s Mailfilter Service (JMS)'
); #end new message section
$msg->scrub(content-type); #from the website to stop using content-type but doesn't work
$msg->attach(TYPE =>'Data', #setup the attachment section & type of attachment !!!!!!!!!!!!THIS IS THE AREA THAT I AM HAVING PROBLEMS WITH!!!!!!!!!!!!!
Path =>'/home/joe/mailfilter_logs/', #where the attachment is located in my puter
Filename =>'mailfilter_delete_count.txt' #the name of the file to be sent
); #end attachment section
#next line: send the message
$msg->send;
========
end code
========
here is the mod at cpan
http://search.cpan.org/author/ERYQ/M...ite.pm#VERSION
i can not get the attachment to send any data. i just get an empty file. if anyone can help me the i will be vary greatful. can someone help me here??