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
REPORTER-MAILX(1)						 LIBREPORT MANUAL						 REPORTER-MAILX(1)

NAME
reporter-mailx - Sends contents of a problem directory via email. SYNOPSIS
reporter-mailx [-v] -d DIR [-c CONFFILE] DESCRIPTION
The tool reads a problem directory, composes an email message from the directory contents, and uses mailx to send the message to specified recipient. Properties of email messages can be specified in a configuration file, and via environment variables. Configuration file Configuration file contains entries in a format "Option = Value". The options are: Subject The subject of the email message. EmailFrom The sender of the email message. EmailTo The recipient of the email message. SendBinaryData Use yes/true/on/1 to attach all binary files from the problem directory to the email. This can cause the emails to be very large. Integration with ABRT events reporter-mailx can be used as a reporter, to allow users report problems via email when they decide to do it. This usage is pre-configured in /etc/libreport/events.d/mailx_event.conf: EVENT=report_Mailx reporter-mailx It can also be used to notify administrator automatically when a problem happens. When this is desired, modify the event configuration file to run the tool on the post-create event: EVENT=post-create reporter-mailx OPTIONS
-d DIR Path to problem directory. -c CONFFILE Path to configuration file. When used in ABRT event system, the file contains site-wide configuration. Users can change the values via environment variables. ENVIRONMENT VARIABLES
Environment variables take precedence over values provided in the configuration file. Mailx_Subject Subject of the email message. Mailx_EmailFrom Sender of the email message. Mailx_EmailTo Recipient of the email message. If nor the environment variable nor the corresponding option is defined, the message is send to "root@localhost". Mailx_SendBinaryData Use yes/true/on/1 to attach all binary files from the problem directory to the email. AUTHORS
o ABRT team LIBREPORT 2.1.11 06/18/2014 REPORTER-MAILX(1)
All times are GMT -4. The time now is 05:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy