sendmail in perl script

I have this bit of code in my perl script.

open STDOUT,'|sendmail user@domain.com' or die $!

How can change this send an attachment, body as well as subject? Please advise.
saibskAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
TintinConnect With a Mentor Commented:
What's the restriction on using modules?

To use sendmail, you do
open MAIL, "|/usr/lib/sendmail -t" or die;
print MAIL <<EOF;
To: some@address
From: someother@address
Subject: My subject
 
Body of the mail
EOF
 
close MAIL;

Open in new window

0
 
FishMongerCommented:
0
 
TintinCommented:
Ditto on the MIME::Lite suggestion.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
saibskAuthor Commented:
I can't download any modules on the box. I need to use some unix mail command .....
0
 
saibskAuthor Commented:
I dont' have the perms to dowonload. But in the above code how do i attach the file
0
 
FishMongerConnect With a Mentor Commented:
0
 
TintinCommented:
When you say you don't have permission to download, do you mean your company policy disallows it, or you are not connected to the Internet?
0
 
saibskAuthor Commented:
company policy.
0
All Courses

From novice to tech pro — start learning today.