In Unix, how do I use Elm to send a file as a mail message from the command line prompt?
Note: The software discussed here is no longer in common use at Indiana University, and UITS may no longer be able to verify the document's accuracy. The UITS Support Center may no longer have the manuals and other materials required to support this software adequately.
To use this procedure, your file must be an ASCII file. If you wish to send a binary file, you must uuencode it first. For more information, see In Unix, how do I uuencode a binary file?
In addition, for the procedure to work, you must run Elm at least once before attempting this procedure. If you have never run Elm:
- At the Unix prompt, enter: elm
- Each time you are prompted to create a directory, press
y.
- At the Elm main screen, press
qto quit.
- When asked to move mail to a
receivedfolder, pressn.Note: If you press
y, you will not be able to see any mail in your Inbox when you return to your usual mail program.
You are now ready to use Elm in batch mode. At the Unix prompt, enter:
elm -s "[subject]" [username1,username2,etc.] < [file]
Replace [subject] with the subject line of your message.
Replace [username1,username2,etc] with a list of
usernames, separated by commas, who will receive the message.
Finally, replace [file] with the file you wish to
include. Here is an example:
elm -s "My resume" dvader@empire.gov,jabba@hutt.com < bobafett.txt
Note: Elm is not available on any UITS systems.
Last modified on May 13, 2009.







