Mail command to send attachements


 
Thread Tools Search this Thread
Operating Systems AIX Mail command to send attachements
# 1  
Old 02-16-2014
Lightbulb Mail command to send attachements

I tried the below command

Code:
uuencode data.txt | mailx -s “Test Mail” “mrp@xyz.com”

But I get the below error

Code:
ksh: uuencode: not found.
Null Message body;  hope that' ok

which clearly tell that uuencode utility is not found.

Is there any other way to send attachments with mail through command line.
At the same time I don't have admin access for the same to install the utility (I use AIX 5.X version Server)
# 2  
Old 02-17-2014
It is probably not a PATH problem as uuencode resides in /usr/bin and if this is not in the PATH you'd probably have bigger problems than finding uuencode. If uuencode is not installed you have to install the package bos.net.uucp to get it.

The package is part of the standard distribution of AIX, so you find it on your installation medium.

I hope this helps.

bakunin
# 3  
Old 02-17-2014
Thanks bakunin!

Unfortunately I dont have admin access for that machine.
# 4  
Old 02-17-2014
Quote:
Originally Posted by rpm120
Thanks bakunin!

Unfortunately I dont have admin access for that machine.
In this case get the admin going! There is no sense in trying to do with workarounds instead of using supported software.

I hope this helps.

bakunin
# 5  
Old 02-17-2014
How about using sendmail instead?
# 6  
Old 02-17-2014
Quote:
Originally Posted by Yoda
How about using sendmail instead?
The problem is not the mailer itself. You need something to encode the parts of a multipart/mime message prior to constructing it. Sending binary data (like pictures, ...) directly, without encoding them first to fit into basic ASCII, is considered bad style, at least by RFC822-purists. But then, having 300-lines-signature-files with animated GIFs in true-color, abusing HTML for mails and similar original sins is against RFC822 too and nobody cares.

bakunin
# 7  
Old 02-17-2014
If uuencode is missing then how about using base64?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send mail with 'mail' command

I am unable to cause the 'mail' command to send mail from my linux ubuntu 15.10 computer. File 'mail.log' typically reports Connection timed out. I issue the command: mail -s "my subject" recipient@domain.com < filenamewhere filename is a file containing my message. Specifically, the... (3 Replies)
Discussion started by: tcnm
3 Replies

2. Shell Programming and Scripting

How to send mail using find command?

Hello, I wanted to send mail to multiple receiptant by using uuencode with find command. I have used the below find command to search a file, which generating daily at the particular time. . find . -type f -mtime -1 -printf '%f %TH:%TM\n' | awk '$NF>"06:40" && $NF<"06:50" {print $1}' I... (2 Replies)
Discussion started by: pokhraj_d
2 Replies

3. Shell Programming and Scripting

Sendmail to send attachements

Hello All, I have been trying to execute a script to send me alerts using a log file of a job which can be success or failed. But when I try to send log as attachment using sendmail it does not not send any email but job runs fine. I am not able to debug it. Please help to get the correct code.... (1 Reply)
Discussion started by: Rossdba
1 Replies

4. Shell Programming and Scripting

Not able to send the mail using mail and mailx command

Hi All, I am trying to send a mail from linux server but could'nt able to send the mail. I tried the below syntax's so far but no luck. mail -s “Hello world” abc@xyz.com < /usr/g/txt.log cat "txt.log" | mailx -s "Hello world" abc@xyz.com mailx -s “Hello world” abc@xyz.com <... (2 Replies)
Discussion started by: scriptscript
2 Replies

5. Fedora

Need to send mail using mail command

Hi Guys, Am tried with the mail & mailx command to send mail to other localhost machine, Which are all connected in a LAN. I can not able to send, Either it wont display any error message at that time and later am receiving a failure mail.. But i can send and receive (from-to) in my machine..... (28 Replies)
Discussion started by: Adhi
28 Replies

6. UNIX for Dummies Questions & Answers

Issues in sending mail with attachements

Hi I am using the below command to send mail from unix with body as well as attachment. But the attachment is in encoded form in the body itself. I am not receiving as attachment: (cat body_success.txt;uuencode Log.txt Log.txt)| mailx -s "success" $ToID I am receiving... (5 Replies)
Discussion started by: pandeesh
5 Replies

7. UNIX for Advanced & Expert Users

Problem while sending mail with attachements

Hi All, I am using mailx command in shell script to send mail with output files as attachment to my email id. When my colleague is running the shell script (script code mentioned below), he is getting the mail but without attachment. Attachment is appeared as junk characters in mail... (4 Replies)
Discussion started by: nishant_pathak_
4 Replies

8. UNIX for Dummies Questions & Answers

command line send mail

Hi, I am trying to send mail in ubuntu. I have installed postfix. In Redhat I could just type: mail name@domain.com I get the error that the command mail is not found. Does anyone know if there is a different command line to send mail? Can I install the command? Thanks, Eric (1 Reply)
Discussion started by: ejbrever
1 Replies

9. Shell Programming and Scripting

Send Attachements in Mail (CSHELL)

Hi All, Is there any way we can send attachement in a mail from the script using CSHELL. Thanks in Advance. (1 Reply)
Discussion started by: surfsg24
1 Replies

10. Linux

attachements with mail command

Is there any way to send attachments via "mail" command from the terminal? im writing a simple bash script to send my backups to my email address (2 Replies)
Discussion started by: C|[anti-trust]
2 Replies
Login or Register to Ask a Question