|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
attachment using sendmail
Hi,
I use the sendmail command to send automatic e-mail in my control programs, but I'd like to know if there's a non interactive way to send an attachment, like a small text file through sendmail command. I didn't find a way in the man, so anyone has already done it?.. give an example for the same thing please help on this? Thanks vastare |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Try searching for your answers or looking in the Answer to Frequently Asked Questions forum. See email portion here
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
How about using mutt?
mutt -a attachment -s "this is the subject" user@emailaddress.com < fileWITHdetail or echo "this is the detail" | mutt -a attachment -s this is the subject" user@emailaddress.com < /dev/null Usage: -a <file> attach a file to the message -b <address> specify a blind carbon-copy (BCC) address -c <address> specify a carbon-copy (CC) address -e <command> specify a command to be executed after initialization -f <file> specify which mailbox to read -F <file> specify an alternate muttrc file -H <file> specify a draft file to read header from -i <file> specify a file which Mutt should include in the reply -m <type> specify a default mailbox type -n causes Mutt not to read the system Muttrc -p recall a postponed message -R open mailbox in read-only mode -s <subj> specify a subject (must be in quotes if it has spaces) -v show version and compile-time definitions -x simulate the mailx send mode -y select a mailbox specified in your `mailboxes' list -z exit immediately if there are no messages in the mailbox -Z open the first folder with new message, exit immediately if none -h this help message |
|
#4
|
|||
|
|||
|
You can use mailx (which uses the Sendmail executable) command:
mailx -s "Subject Line" user@somewhere < /name/of/text_file |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
In your example, I believe the contents of text_file would be in the BODY of the email...not as an attachment.
happy new year, manny |
| Sponsored Links | ||
|
![]() |
| Tags |
| mailx, mailx attachment |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sendmail with HTML body and attachment | atelford | Shell Programming and Scripting | 8 | 09-30-2011 06:10 AM |
| sendmail attachment issue | Shahul | Shell Programming and Scripting | 4 | 03-05-2010 12:47 PM |
| sendmail attachment problem | yakari | UNIX for Dummies Questions & Answers | 1 | 07-02-2009 11:47 PM |
| Using Sendmail (& attachment) | kenkanya | UNIX for Dummies Questions & Answers | 3 | 01-19-2009 10:22 PM |
| sendmail attachment | jayman | Shell Programming and Scripting | 3 | 08-05-2008 01:20 AM |
|
|