LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-10-2004, 02:54 PM   #1
dong@aproposret
LQ Newbie
 
Registered: Oct 2002
Location: Chapel Hill, NC
Posts: 7

Rep: Reputation: 0
syntax for mailing a file


I have a file test_file, & I want to mail it to someone, along with a subject line.
In a bourne shell, my syntax is:
mail -s 'Subject blah, blah' joe@somewhere.com < test_file

This doesn't work in a bash shell.
Can anyone tell me what my syntax should be?
 
Old 03-10-2004, 03:05 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,623
Blog Entries: 10

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
Ummm ... test_file being ASCII text that
you want to send as the message body?

If you're trying to send an attachment
have a look at nail, mutt or similar...


Cheers,
Tink
 
Old 03-10-2004, 03:12 PM   #3
dong@aproposret
LQ Newbie
 
Registered: Oct 2002
Location: Chapel Hill, NC
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, it is an ascii file, & yes I want the file to comprise the body of the email.

But, now you have me curious - so, my 2nd question is 'how do I attach the file'?
 
Old 03-10-2004, 03:28 PM   #4
dong@aproposret
LQ Newbie
 
Registered: Oct 2002
Location: Chapel Hill, NC
Posts: 7

Original Poster
Rep: Reputation: 0
Never mind on putting the file into the body of the email. It does work as I'm doing it - I neglected to note that the file I'm reading in, is empty...duh.

I'd still like to know how to send the file as an attachment.
 
Old 03-11-2004, 01:49 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,623
Blog Entries: 10

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
LOL :}

mutt -a <attachment> -s <subject> <recipient@mailbox.net> < message.txt


That should do the trick ...


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
Is there any app to convert emacs's syntax highlight def. file to vim's def. file ? cyu021 Linux - Software 0 10-05-2004 11:02 PM
Mailing a file on a regular basis Sn7 Linux - Software 4 07-19-2004 08:37 AM
correct syntax for a canonical file? rioguia Linux - Software 1 11-04-2003 02:11 AM
I need the syntax for emailing a log file. Pcghost Linux - General 14 07-22-2003 11:37 AM


All times are GMT -5. The time now is 12:05 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration