Hi monks
I am writting a program that sends a mail when it is done, with a list of failed resources as output (part of a metasearch engine)
For this I am using the module Mail::SendMail
This the code
#!/exlibris/metalib/m4_b/product/bin/perl
BEGIN {
unshift (@INC, $ENV{'alephm_source'}.'/com_perl');
}
use Mail::Sendmail;
my $email ='guy.naamati@exlibris.co.il';
my $from ='guy.naamati@exlibris.co.il';
my $subject='test email';
my $message='';
my $file = "";
my $message = 'institution Name: METALIB
No. of tested resources: 52
No. of failed searches (0 results or errors in all attempts): 49
Display names of these resources + Resource ID:
ARTstor (CKB02692)
Internet Securities, Inc. - Emerging Market Information service - EMIS
+ - TEMPLATE (CKB02693)
IU ViewsWire (ProQuest) (CKB02673)
ProQuest Snapshot Series (ProQuest) (CKB02678)
Hoover's Company Records (ProQuest) (CKB02688)
OxResearch (ProQuest) (CKB02687)
ProQuest Newspapers Template (ProQuest) (CKB02677)
American Periodicals Series - APS Online (ProQuest) (CKB02593)
ProQuest Dissertations and Theses (ProQuest) (CKB02569)
MDConsult (CKB03084)
Canadian Newsstand Core (ProQuest) (CKB02690)
ABI/INFORM Complete (ProQuest) (CKB02686)
ABI/INFORM Dateline (ProQuest) (CKB02685)
ABI/INFORM Trade & Industry (ProQuest) (CKB02674)
PsycArticles (ProQuest) (CKB02661)
Academic Research Library (ProQuest) (CKB03332)
CBCA Education (ProQuest) (CKB03331)
CINAHL (ProQuest) (CKB03300)
ProQuest Social Science Journals (ProQuest) (CKB03288)
ProQuest Science Journals (ProQuest) (CKB03287)
ProQuest Humanities (ProQuest) (CKB03286)
ProQuest Health & Medical Complete (ProQuest) (CKB03285)
ProQuest Children's Interest (ProQuest) (CKB03284)
ProQuest ANZ Newsstand (ProQuest) (CKB03283)
ProQuest Law (ProQuest) (CKB03282)
Canadian Business & Current Affairs - CBCA - Complete (ProQuest) (CKB0
+2602)
Ethnic NewsWatch and ENW: A History (ProQuest) (CKB02601)
Ethnic NewsWatch (ProQuest) (CKB02600)
GenderWatch (ProQuest) (CKB02599)
Alt-Press Watch (ProQuest) (CKB02598)
Wilson Education Abstracts (ProQuest) (CKB02597)
ProQuest Education Journals (ProQuest) (CKB02596)
Criminal Justice Periodicals (ProQuest) (CKB02595)
ProQuest Nursing Journals (ProQuest) (CKB02594)
Research Library (ProQuest) (CKB02592)
Career and Technical Education (ProQuest) (CKB02591)
ProQuest Religion (ProQuest) (CKB02590)
ProQuest Telecommunications (ProQuest) (CKB02589)
ProQuest Computing (ProQuest) (CKB02588)
ProQuest Historical Newspapers Complete (ProQuest) (CKB02587)
ProQuest European Business (ProQuest) (CKB02586)
To view the full results please click on the following link: http://i
+l-mldev03.corp.exlibrisgroup.com:8302/tmp/test_robot_2007052011214.xl
+s';
my %mail=(
To => $email,
From => $from,
File => $file,
Subject => $subject,
Message => $message
);
my $return = Mail::Sendmail::sendmail(%mail);
$error = $Mail::Sendmail::error;
$log = $Mail::Sendmail::log;
#print "return=$return\n";
#print "error =$error\n";
print "log=$log\n";
This works great for short messages, but when the message is long (as in the example), the mail isn't sent. I looked at the log and the error message returned, but couldn't find anything. I also tried to send the long mail in Net::SMTP but with no success.
If I delete most of the message, the mail is sent. Does anyone know what the problem with the large message is?
Much obliged
Guy Naamati (mrguy123)