Email from command line (Unix)
I need to send an email from the command line. Could anybody please help me?
The problem I''m having is that I''ve got my assignments on the uni''s Unix server and the printer connected to it is DOWN. Thus, the only way I can print my assignments is to send a copy of the file to my email address and print them from home.
And no, there isn''t a floppy drive or other form of removal media on the stupid machine, so I''ll have to use email. There isn''t a GUI either, that''s why it must be command line. Could anybody help?
Please......
If it is important, the version of Unix is Solaris 5
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Does the server have Pine on it? If so, use it.
If not, use the mail command. Type ''man mail'' for all the details.
~~~~~~~~~~
Martee
http://www.csc.uvic.ca/~mdill
If not, use the mail command. Type ''man mail'' for all the details.
~~~~~~~~~~
Martee
http://www.csc.uvic.ca/~mdill
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Easy peasy.
If the server has sendmail on it (very likely) then open up "/usr/sbin/sendmail -t" (or wherever it is, you can find it out by typing "whereis sendmail") and then pipe your email & headers to the standard input. Heres a quick perl script that you can just copy and paste and modify as appropriate:
or, if you want to be clever and open up your assignment file and then print it to the email...
Thinking about it im not to sure if the second example will work with old perl versions, but its worth a shot.
Edited by - jumble on June 16, 2001 5:06:30 AM
If the server has sendmail on it (very likely) then open up "/usr/sbin/sendmail -t" (or wherever it is, you can find it out by typing "whereis sendmail") and then pipe your email & headers to the standard input. Heres a quick perl script that you can just copy and paste and modify as appropriate:
|
or, if you want to be clever and open up your assignment file and then print it to the email...
|
Thinking about it im not to sure if the second example will work with old perl versions, but its worth a shot.
Edited by - jumble on June 16, 2001 5:06:30 AM
jumble-----------
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement