Operating System - HP-UX
1753820 Members
9029 Online
108805 Solutions
New Discussion юеВ

Can I send email with attachment?

 
SOLVED
Go to solution
Young C. Jun
Occasional Contributor

Can I send email with attachment?

Hell All,

Can I attach any file to the elm?
I mean I'd like to write some contents and attch excel file on the UNIX using elm.

Can I do that? How?

TIA
5 REPLIES 5
Rick Garland
Honored Contributor

Re: Can I send email with attachment?

There are numerous posts related to this question. Did a SEARCH on elm AND attachments
and many show up.


Alan Riggs
Honored Contributor

Re: Can I send email with attachment?

uuencode file attachment_name | elm . . .
CHRIS ANORUO
Honored Contributor
Solution

Re: Can I send email with attachment?

There are three ways to send and attachment.
#(1) Send in body of e-mail mailx -s 'Subject Lines goes here' user@company.com < filename.txt
#(2) To send as an attachment /usr/bin/uuencode filename.Z filename.Z | /usr/sbin/sendmail user@company.com
#(3) To send as an attachment with Subject, From and To
(
echo "From: "
echo "To: "
echo "Subject: "
echo "This is the body of the e-mail.
If you are having any problem with this file please give us a call.


"
/usr/bin/uuencode /local/filename filename
) | /usr/sbin/sendmail user@company.com

I hope this helps!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
James R. Ferguson
Acclaimed Contributor

Re: Can I send email with attachment?

Manuel Contreras
Regular Advisor

Re: Can I send email with attachment?

Option number 4 could be "mutt"

The following command will send a blank message with the file "~/myfile" attached, with the subject "here is the file" to "mr_manny@icecream.com".

mutt -a ~/myfile -s "here is the file" mr_manny@icecream.com < /dev/null

command line -

send mail w/an Attachment and Bcc another account(blind copy)

mutt -a ~/myfile -b joe@icecream.com -s "test mutt" mr_manny@icecream.com < /dev/null


other command line options

Running mutt with no arguments will make Mutt attempt to read your spool mailbox. However, it is possible to read other mailboxes andmessages from the command line as well.

-a attach a file to a message
-c specify a carbon-copy (Cc) address
-e specify a config command to be run after initilization files are read
-F specify an alternate file to read initialization commands
-f specify a mailbox to load
-h print help on command line options
-H specify a draft file from which to read a header and body
-i specify a file to include in a message composition
-n do not read the system Muttrc
-m specify a default mailbox type
-p recall a postponed message
-R open mailbox in read-only mode
-s specify a subject (enclose in quotes if it contains spaces)
-v show version number and compile-time definitions
-x simulate the mailx(1) compose mode
-y show a menu containing the files
-z exit immediately if there are no messages in the mailbox
-Z open the first folder with new message,exit immediately if none

hope this helps,
manny