Re: [opensuse] sending ASCII file with mail command
joukj@hrem.nano.tudelft.nl wrote on 26-SEP-2007 08:22:29.57
ka1ifq@sbcglobal.net wrote on 25-SEP-2007 16:30:46.36
On Tuesday 25 September 2007 09:34, Jacob (=Jouk) Jansen wrote:
Hi all,
I try to send an E-mail with the content of an ASCII file as the body. I do this with the following command mail -s subj joukj@hrem.nano.tudelft.nl < licinfo.txt
When I give the command on a Fedora (several versions tested) the E-mail is recieved with the expected text in the body. If I give the command on an OpenSuse 10.2 system An E-mail which is unreadable is recieved at the other end.
How can I get the same behaviour on the OpenSuse system as on the Fedora system?
Jouk Jansen
man mail says the following.
-q file Start the message with the contents of the specified file. May be given in send mode only.
Same "wrong" result. Jouk
Summary :
mail -s subj joukj@emal.adr < file.txt
cat file.txt | mail -s subj joukj@emal.adr
mail -s subj joukj@emal.adr -q file.txt
All give the same result
However
mail -s subj joukj@emal.adr
------------------------------------------------------------------------------< Jouk Jansen
joukj@hrem.nano.tudelft.nl
Technische Universiteit Delft tttttttttt uu uu ddddddd
Kavli Institute of Nanoscience tttttttttt uu uu dd dd
Nationaal centrum voor HREM tt uu uu dd dd
Lorentzweg 1 tt uu uu dd dd
2628 CJ Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2782272 tt uuuuuuu ddddddd ------------------------------------------------------------------------------< --
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse+help@opensuse.org
Jacob (=Jouk) Jansen wrote:
joukj@hrem.nano.tudelft.nl wrote on 26-SEP-2007 08:22:29.57
ka1ifq@sbcglobal.net wrote on 25-SEP-2007 16:30:46.36
On Tuesday 25 September 2007 09:34, Jacob (=Jouk) Jansen wrote:
Hi all,
I try to send an E-mail with the content of an ASCII file as the body. I do this with the following command mail -s subj joukj@hrem.nano.tudelft.nl < licinfo.txt
When I give the command on a Fedora (several versions tested) the E-mail is recieved with the expected text in the body. If I give the command on an OpenSuse 10.2 system An E-mail which is unreadable is recieved at the other end.
How can I get the same behaviour on the OpenSuse system as on the Fedora system?
Jouk Jansen man mail says the following.
-q file Start the message with the contents of the specified file. May be given in send mode only. Same "wrong" result. Jouk
Summary : mail -s subj joukj@emal.adr < file.txt cat file.txt | mail -s subj joukj@emal.adr mail -s subj joukj@emal.adr -q file.txt All give the same result
However mail -s subj joukj@emal.adr
The problem seems to be that in the former case the file is Base64 encoded and in the latter case just send in as "plain text". I would like to send "plain text" in all cases. I thought that |(piping) or < where only redirecting the stdin. So I do not understand why mail discriminates between |,< on one hand and "real terminal" input on the other hand.
Probably because on suse, '/usr/bin/mail' is a link to /usr/bin/mailx, which isn't, in fact, the same as 'mail' on the other systems. Not sure what the difference is. Check 'man mail' for more help and check out the section towards the bottom about "Sending mail from scripts". -- Jonathan Arnold (mailto:jdarnold@buddydog.org) Linux Brain Dump - Linux Notes, HOWTOs and Tutorials: http://www.linuxbraindump.org Daemon Dancing in the Dark, an Open OS weblog: http://freebsd.amazingdev.com/blog/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Jacob (=Jouk) Jansen
-
Jonathan Arnold