Sponsored Content
Full Discussion: Attach file in mailx command
Top Forums Shell Programming and Scripting Attach file in mailx command Post 302521074 by Himanshu_soni on Tuesday 10th of May 2011 07:03:13 AM
Old 05-10-2011
Attach file in mailx command

Hi
I want ot send a mail with aatach a file for this i have tried

Code:
mailx -s "COMPLETED: deal.sh" -a root/usr/local/bin/sched/nightly_Cronjob/test.out me@nowhere

Code:
uuencode /usr/local/bin/sched/nightly_Cronjob/test.out /usr/local/bin/sched/nightly_Cronjob/test.out | mailx -s "COMPLETED: deal.sh" me@nowhere

but of command is not working. so is there any otner way to send a mail with attachment.

Thanks in advance

Moderator's Comments:
Mod Comment Please use [CODE] tags when posting command lines, listings, ...

Last edited by pludi; 05-10-2011 at 08:17 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
MAILER.CONF(5)						      BSD File Formats Manual						    MAILER.CONF(5)

NAME
mailer.conf -- configuration file for mailwrapper(8) DESCRIPTION
The file /etc/mail/mailer.conf contains a series of lines of the form name program [arguments ...] The first word of each line is the name of a program invoking mailwrapper(8). (For example, on a typical system /usr/sbin/sendmail would be a symbolic link to mailwrapper(8), as would newaliases(1) and mailq(1). Thus, name might be ``sendmail'' or ``newaliases'' etc.) The second word of each line is the name of the program to actually execute when the first name is invoked. The further arguments, if any, are passed to the program, followed by the arguments mailwrapper(8) was called with. The file may also contain comment lines, denoted by a '#' mark in the first column of any line. FILES
/etc/mail/mailer.conf EXAMPLES
This example shows how to set up mailer.conf to invoke the traditional sendmail(8) program: # Execute the "real" sendmail program located in # /usr/libexec/sendmail/sendmail sendmail /usr/libexec/sendmail/sendmail send-mail /usr/libexec/sendmail/sendmail mailq /usr/libexec/sendmail/sendmail newaliases /usr/libexec/sendmail/sendmail This example shows how to invoke a sendmail-workalike like Postfix in place of sendmail(8): # Emulate sendmail using postfix sendmail /usr/local/sbin/sendmail send-mail /usr/local/sbin/sendmail mailq /usr/local/sbin/sendmail newaliases /usr/local/sbin/sendmail This example shows how to invoke a sendmail-workalike with Exim (from ports) in place of sendmail(8): # Emulate sendmail using exim sendmail /usr/local/sbin/exim send-mail /usr/local/sbin/exim mailq /usr/local/sbin/exim -bp newaliases /usr/bin/true rmail /usr/local/sbin/exim -i -oee This example shows the use of the mini_sendmail package from ports in place of sendmail(8). Note the use of additional arguments. # Send outgoing mail to a smart relay using mini_sendmail sendmail /usr/local/bin/mini_sendmail -srelayhost send-mail /usr/local/bin/mini_sendmail -srelayhost SEE ALSO
mail(1), mailq(1), newaliases(1), mailwrapper(8), sendmail(8) postfix(1) (ports/mail/postfix), mini_sendmail(8) (ports/mail/mini_sendmail) HISTORY
mailer.conf appeared in NetBSD 1.4. AUTHORS
Perry E. Metzger <perry@piermont.com> BUGS
The entire reason this program exists is a crock. Instead, a command for how to submit mail should be standardized, and all the "behave dif- ferently if invoked with a different name" behavior of things like mailq(1) should go away. BSD
October 8, 2010 BSD
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy