Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-10-2002, 06:50 AM   #1
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES11 / FC20/ OES / CentOS
Posts: 609

Rep: Reputation: 32
sending a mail appending a file

ok, now in know how to send an email via console:

mail nameofuser

and i know how to append the text of a file

mail nameofuser < readme.txt

but how can i append the whole file ?

Old 07-10-2002, 06:55 AM   #2
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
mail nameofuser < readme.txt does append the whole text file?

Unless maybe your distro has sendmail configured
to restrict the size of file attachments? As a anti-spamming
Old 07-10-2002, 06:55 AM   #3
Registered: Sep 2001
Distribution: Gentoo
Posts: 760

Rep: Reputation: 31
You mean as an attachment? Using mail - its very tricky. I would suggest using mutt instead.

mutt -s "Subject of email" -a path/to/attached/file < path/to/body/of/message
Old 07-11-2002, 12:39 PM   #4
Senior Member
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Pine is also easy:

pine addressee -attach /path/to/attachment

and then you can type the subject, text, etc. in pine's 'window'. You can possibly also type in everything on the commandline, but I somehow preferred this way.

Last edited by J_Szucs; 07-11-2002 at 12:41 PM.
Old 07-12-2002, 03:50 AM   #5
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES11 / FC20/ OES / CentOS
Posts: 609

Original Poster
Rep: Reputation: 32

so the pc starts pine !
how should i do this in a cron job?
i have to enter cc and so on....


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending mail from shell with attached file loopoo Linux - Newbie 1 11-17-2005 03:23 PM
Sending mail from shell with attached file loopoo Linux - General 3 11-17-2005 10:57 AM
Sed(?); Appending a comma-delineated file ice_hockey Linux - General 2 05-27-2005 08:42 AM
Appending a string to a file JStew Linux - General 13 03-04-2003 03:48 PM
Appending current date and time to a file frankietomatoes Linux - General 5 11-18-2002 02:09 PM

All times are GMT -5. The time now is 09:10 PM.

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