Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sendmail in perl script

Posted on 2008-06-17
8
Medium Priority
?
249 Views
Last Modified: 2010-03-05
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.
0
Comment
Question by:saibsk
  • 3
  • 3
  • 2
8 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 21806557
0
 
LVL 48

Expert Comment

by:Tintin
ID: 21806983
Ditto on the MIME::Lite suggestion.
0
 

Author Comment

by:saibsk
ID: 21807068
I can't download any modules on the box. I need to use some unix mail command .....
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 48

Accepted Solution

by:
Tintin earned 1000 total points
ID: 21807089
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
 

Author Comment

by:saibsk
ID: 21807117
I dont' have the perms to dowonload. But in the above code how do i attach the file
0
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 1000 total points
ID: 21807184
0
 
LVL 48

Expert Comment

by:Tintin
ID: 21807880
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
 

Author Comment

by:saibsk
ID: 21812332
company policy.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question