Sponsored Content
Full Discussion: Attach file in mailx command
Top Forums Shell Programming and Scripting Attach file in mailx command Post 302521088 by methyl on Tuesday 10th of May 2011 07:30:12 AM
Old 05-10-2011
Quote:
uuencode /usr/local/bin/sched/nightly_Cronjob/test.out /usr/local/bin/sched/nightly_Cronjob/test.out | mailx -s "COMPLETED: deal.sh" me@nowhere
First reaction is to give the attachment a valid MS-DOS name.
Code:
uuencode /usr/local/bin/sched/nightly_Cronjob/test.out myattach.txt | mailx -s "COMPLETED: deal.sh" me@nowhere

And to consider converting the attachment to MS-DOS format.
Code:
ux2dos /usr/local/bin/sched/nightly_Cronjob/test.out | uuencode myattach.txt | mailx -s "COMPLETED: deal.sh" me@nowhere

Failing that, please mention what Operating System and Shell you are using and describe what happens.

Does mailx without an attachment work?
What mail reader are you using?

Last edited by methyl; 05-10-2011 at 08:41 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

attach 2 files using mailx

if test.dat is the file cat test.dat|uuencode test.dat|mailx -s "subject" mailid can be used for attaching test.dat how can i attach more than one file to a mail using mailx (2 Replies)
Discussion started by: anumkoshy
2 Replies

2. Shell Programming and Scripting

How to attach a file in Linux mail command

How to attach a file in Linux mail command Hi Guys, Is there any way to attach a file in Linux mail command without using "uuencode"? i.e. Code: file=/a/b/c/d/file.txtmail -s "Giga aks" abc@123.com <<HDoc`uuencode $file $file 2>/dev/null`HDoc Here, I don;t want to use 'uuencode'... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

3. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

4. Shell Programming and Scripting

Can not attach using mailx

hi I know this topic has been discussed a lot in the forum but still couldnt get a exact solution to problem i am facing I have a CSV file genertaed on Unix box and want to be sent to my email . mailx -s "TEST" "xyz@hotmail.com" < 1.csv cat 1.csv | mailx -s "TEST" "xyz@hotmail.com" ... (10 Replies)
Discussion started by: ultimatix
10 Replies

5. Shell Programming and Scripting

How to split a csv file and zip it and attach using mutt command?

We need to redirect the output of a query to .csv file each containing a specified number of lines.Then we should zip these files and send as attachment using mutt command. We tried using split -l 500 query_output.txt outputfile Since we are not sure about the exact number of files... (0 Replies)
Discussion started by: Jassz
0 Replies

6. Shell Programming and Scripting

Attach file in mailx command

Hi I want ot send a mail with aatach a file for this i have tried mailx -s "COMPLETED: deal.sh" -a /usr/local/bin/test.out me@nowhere uuencode /usr/local/bin/test.out /usr/local/bin/test.out | mailx -s "COMPLETED: deal.sh" me@nowhere but of command is not working. so is there any... (0 Replies)
Discussion started by: Himanshu_soni
0 Replies

7. Shell Programming and Scripting

How to attach multiple file to send mail command

Hi, i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall: I want to send two attachments -ahmed.csv and ahmed1.csv . Sample content: <html> <body> <b> Hi...</b> </body> </html> ... (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

8. Shell Programming and Scripting

want to send .csv file as an attachment using mailx command.

want to send .csv file as an attachment using mailx command. Please help!!! (1 Reply)
Discussion started by: gagandeep
1 Replies

9. Shell Programming and Scripting

Mailx command to send attachment file

Hi, I need to send a attachment which has space in the file name as: "ABC Data Extract.txt" which is present in the location /home/projects/txt i am using /home/projects/scripts mailx -s "Sub" email_id "/home/projects/txt/ABC Data Extract.txt" but i am not getting the attachment. (7 Replies)
Discussion started by: ATWC
7 Replies

10. Shell Programming and Scripting

Unable to attach a .txt file or .log file to mail and mailx command

Hi, I am trying to attach a .log file or .txt file to mail command to send an email once my ksh script executed. I am unable to use mutt command as it has been not installed and i am not supposed to install it. I have tried many ways by googling which has not helped me to succeed. Here is my... (5 Replies)
Discussion started by: Samah
5 Replies
RCVPACK(1)                                                           [nmh-1.5]                                                          RCVPACK(1)

NAME
rcvpack - append message to file SYNOPSIS
/usr/lib/mh/rcvpack file [-mbox] [-mmdf] [-version] [-help] DESCRIPTION
The rcvpack program will append a copy of the message to the file listed on its command line. If the -mbox switch is given (the default), then the messages are separated using mbox (uucp) style delimiters. This is the format used by most mail clients (elm, mailx, etc.). If the -mmdf switch is given, then the messages are separated by mmdf style delimiters. Each message in the file is separated by four CTRL-A's and a newline. rcvpack will correctly lock and unlock the file to serialize access to the file, when running multiple copies of rcvpack . In general, its use is obsoleted by the file action of slocal, although it might still have occasional uses in various shell scripts. FILES
/etc/nmh/mts.conf nmh mts configuration file SEE ALSO
rcvdist(1), rcvstore(1), rcvtty(1), slocal(1) BUGS
Only two return codes are meaningful, others should be. MH.6.8 11 June 2012 RCVPACK(1)
All times are GMT -4. The time now is 01:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy