Krzysztof Kocjan wrote: > Hi > > I need simple code to send e-mail from perl script using sendmail > program (Linux RedHat). I don't use SMTP server. I tried to use > SOAP::Lite with sendmail but I've got lot of errors, so I lost it. I > tried to use system() perl function to run sandmail, but my main problem > is how to send multiline message. Thank You for any sugestions.
Either use MIME::Lite or just code it: use strict; # define mailto, from, subject, etc. here my $mailer = '/usr/sbin/sendmail'; unless (open (MAIL, "|$mailer -t -oi")) { # process an error here } print MAIL "To: $mailto\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n"; print MAIL "\n"; print MAIL $mail_msg; print MAIL "\n"; close MAIL; -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs