Sponsored Content
Top Forums UNIX for Beginners Questions & Answers No content in the attached file when sending it via Mailx command on Solaris Post 303045196 by Sphinx19 on Friday 13th of March 2020 08:17:05 AM
Old 03-13-2020
No content in the attached file when sending it via Mailx command on Solaris

Hi All,

I am trying to send a file using the Mailx command but when I receive the file I am getting an empty file. Below are the commands that I am using:
Code:
uuencode /path/ MAIL new.html >> my_attachment
/usr/bin/mailx -s "Testing" -v  emailid@com< my_attachment

I get the file in the mail but when I open it , its empty, I can see the size of the file is also mentioned around 200Kb.
I am also getting a message like this in the mail body:
Code:
begin-base64 644 wombat_2020-02-24.log.

I have tried to send txt file, html file but still getting the same issue.

Moderator's Comments:
Mod Comment Please do wrap your samples/codes in CODE TAGS as per forum rules.

Last edited by rbatte1; 03-13-2020 at 09:52 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with mailx command when sending attachment.

Hi, I have tried to sent a mail with body and attachment. But the shell script got hanging while executing that command. The command is "(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com" where body is a file having a single line.... (2 Replies)
Discussion started by: miltony
2 Replies

2. Shell Programming and Scripting

mailx attachment sending large file

Hi I want to sent attachment file which is 400mb size.(single file, not tar file) is there any way that these kind of large files can be divided into small sizes and sent as attachments thanks with anticipation (3 Replies)
Discussion started by: karthikn7974
3 Replies

3. UNIX for Dummies Questions & Answers

sending mail using mailx command

Hi All, Please help me regarding sending mails using mailx command in unix. I will be glad if some one give me the sintax of this. I tried using the below but vain. mailx -s 'Hi' 'xyz@abc.com' Regards, Manas (5 Replies)
Discussion started by: manas6
5 Replies

4. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

5. Shell Programming and Scripting

sending mail through mailx command

Hi I need help to send mail through mailx command . Currenlt my program is like #!/bin/ksh -x echo " " >> path.lst MAIL_LIST='someone1@gamil.com someone2@gamil.com someone3@gamil.com' cat path.lst | mailx -s "path loaction" $MAIL_LIST echo "End" exit 0 Its work fine . But i... (3 Replies)
Discussion started by: mani_isha
3 Replies

6. Shell Programming and Scripting

mailx -s not sending the file to mail address

Hi All, OS:Red Hat Linux 4 86x64 Below is my shell script which is not sending mail to the mail recipient: #!/bin/bash export MAILLIST="xyz@yahoo.com" cd <path_to_the_script_perf_report.sql> sqlplus / as sysdba @perf_report.sql if then cat <path_to_the_script/*MONTHLY*REPORT*.lst... (6 Replies)
Discussion started by: a1_win
6 Replies

7. Shell Programming and Scripting

How to embed a html file in a mail sending from Linux box with uuencode or mailx?

How to embed a html file as subject in a mail sending from Linux box with uuencode or mailx or any other way? we do not want the file as attachment, it should be embedded in the mail subject. (2 Replies)
Discussion started by: johnveslin
2 Replies

8. Shell Programming and Scripting

sending content of a file in Expect

How Can I send the content of a file in Expect? Do I have to use cat command in a way? if yes how? lets say my file is called 1.txt. example: expect "Enter command to send:" {send "???? \r"} ???? --> content of the file 1.txt (1 Reply)
Discussion started by: alireza6485
1 Replies

9. Shell Programming and Scripting

Mailx attachment not getting attached.

Hi Friends, Please help me with this problem. I have a number of split files in a directory. each split files has pdf filenames in it. pdf files are also in the same directory. I send a mail for each split files present in the directory with the pdf file mentioned in the file. I have... (4 Replies)
Discussion started by: jcebalaji
4 Replies

10. Shell Programming and Scripting

Problems sending an attached file with uuencode

I use uuencode in UNIX to send an attached .txt file to my e-mail. The .txt file looks like this: field_1;field_2;field_3 1;2;3 4;5;6 7;8;9 ... When the mail comes, with the attached file, it looks likt thuis: field_1;field_2;field_3 ;1;2;3 ;4;5;6 ;7;8;9 The different lines are... (3 Replies)
Discussion started by: katled
3 Replies
uuencode(1)						      General Commands Manual						       uuencode(1)

NAME
uuencode, uudecode - Encodes or decodes a binary file SYNOPSIS
uuencode [file] remotefile uudecode [file...] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: uudecode: XCU5.0 uuencode: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The uuencode and uudecode commands are used to send a binary file via uucp or other mail. This combination can be used over indirect mail links even when uusend is not available. The uuencode command takes the named file (default standard input) and produces an encoded version on the standard output. The encoding uses only printing ASCII characters, and includes the mode of the file and the name for re-creation on the remote system, specified by remotefile. The uudecode command reads an encoded file, strips off any leading and trailing lines added by mailers, and recreates the original file with the specified mode and name. Filter the encode through the uudecode program. Filtering the file causes the original file to be auto- matically recreated. This is possible on the uucp network by using sendmail or by making rmail be a link to mailx. In each case, an alias must be created in a master file to get the automatic invocation of uudecode. If neither of the preceding facilities is available on a user's system, uudecode can be applied to the file manually by editing the file with any text editor, removing the trailing and leading lines, and changing the mode or remote system name. The encoded file is an ordinary text file. EXAMPLES
In the following example, the ex1 file is encoded; the output is also redirected to the ex1.out file: prompt> uuencode ex1 ex1.en > ex1.out If the source ex1 file is as follows: This example shows how to encode a file using uuencode and how to decode a file using uudecode. The encoded ex1.out file would be as follows: begin 644 ex1.en M5&AI<R!E>&%M<&QE('-H;W=S"G1H92!H;W<@=&@96YC;V1E"F$@9FEL92!U M<VEN9PIU=65N8V]D90IA;F0@:&]W('1O"F1E8V]D92!A(&9I;&4*=7-I;F<@ *=75D96-O9&4N"F]D ` end In the following example, the ex1.out file is decoded: prompt> uudecode ex1.out In this example, the uudecode command decodes the file and puts the output in ex1.en. To package up a source tree using tar, com- press it, uuencode it, and mail it to a user on another system, enter: tar cf - src_tree | compress | uuencode src_tree.tar.Z | mail sys1!sys2!user1 (Enter the command entirely on one line, not on two lines as shown above.) When uudecode is run on the target system, the src_tree.tar.Z file is created; it may then be uncompressed and dearchived with tar. SEE ALSO
Commands: ct(1), cu(1), mailx(1), Mail(1), rmail(1), sendmail(8), tip(1), uucico(8), uucleanup(8), uucp(1), uulog(1), uuname(1), uupick(1), uusched(8), uusend(1), uustat(1), uuto(1), uux(1) Standards: standards(5) uuencode(1)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy