attachment using sendmail | Unix Linux Forums | Solaris

  Unix/Linux Go Back    


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.

attachment using sendmail

Solaris


Tags
mailx, mailx attachment

Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-15-2005
vastare vastare is offline
Registered User
 
Join Date: Dec 2005
Last Activity: 23 September 2008, 3:18 AM EDT
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
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  
Old Unix and Linux 12-15-2005
RTM's Unix or Linux Image
RTM RTM is offline Forum Advisor  
Registered User
 
Join Date: Apr 2002
Last Activity: 17 October 2014, 8:46 PM EDT
Location: On my motorcycle
Posts: 3,093
Thanks: 1
Thanked 33 Times in 9 Posts
Try searching for your answers or looking in the Answer to Frequently Asked Questions forum. See email portion here
Sponsored Links
    #3  
Old Unix and Linux 12-15-2005
mr_manny mr_manny is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 15 November 2013, 4:46 PM EST
Posts: 154
Thanks: 1
Thanked 2 Times in 2 Posts
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  
Old Unix and Linux 01-03-2006
coffeysm coffeysm is offline
Registered User
 
Join Date: May 2005
Last Activity: 3 January 2006, 2:05 AM EST
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
You can use mailx (which uses the Sendmail executable) command:

mailx -s "Subject Line" user@somewhere < /name/of/text_file
Sponsored Links
    #5  
Old Unix and Linux 01-03-2006
mr_manny mr_manny is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 15 November 2013, 4:46 PM EST
Posts: 154
Thanks: 1
Thanked 2 Times in 2 Posts
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
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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



All times are GMT -4. The time now is 12:22 AM.