01-11-2008
uuencode/mailx
Hi all,
I know how to use the uuencode/mailx commands to mail a single file within a directory, e.g.
uuencode file.dat file.dat | mailx
joe.smith@mail.com
but now, i need to be able to mail every file within the directory with one command, any ideas?
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this code below that works well. I also want to attach a logfile to the email. The first part of this code is the body of the email.
echo "The size of $dirname/$f1 size = $f1size, and $dirname/$f2 = $f2size'" | mailx -s "Error with file sizes on $HOST Server" xyz@company.com
... (1 Reply)
Discussion started by: ssmiths001
1 Replies
2. UNIX for Dummies Questions & Answers
If I use the "Mail" link instead of the "mail" link to ../mailx I get this error.
Mail so-n-so @whatever.com
mailx: NUL changed to @
Unknown command: "postmaster"
The email still goes through but i get the error.
If I use "mail" it goes thru without the error.
Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
3. Solaris
We are running solaris 9.
I can send emails using mailx with no problems.
I can send attachments using uuencode no problems.
What I can't do is change the name to .txt or .doc or anything else using uuencode. The command I am using is:
uuencode /tmp/AsetReports /tmp/AsetReports.doc | mailx -s... (2 Replies)
Discussion started by: zeekstern
2 Replies
4. Shell Programming and Scripting
I've this command to run ...
Purpose : Send attachment file with e-mail body...
( E-mail body i read it from text file)
uuencode TEST_FILE.csv TEST_FILE.csv | cat /usr/local/bin/EMAIL_BODY.txt - | mailx -s "TEST Report" -c receiver1@mail.com receiver2@mail.com
Here is the... (2 Replies)
Discussion started by: prash184u
2 Replies
5. Shell Programming and Scripting
The following is an extract from one of my Shell Scripts which uses uuencode and mailx to send an email with multiple attachements:
uuencode $LOG_REPORT $(basename $LOG_REPORT)
uuencode $HTML_FILE $(basename $HTML_FILE )
) | if
then mailx -b "$COPY_TO" -s "$SUBJECT" -r "$MAIL_FROM"... (2 Replies)
Discussion started by: suthera
2 Replies
6. Shell Programming and Scripting
Hi,
I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue.
( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt
cat body.txt attachment.txt > combinemail.txt
mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies
7. Shell Programming and Scripting
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
Here's my code -
FILES="file1 file2 file3"
for File in ${FILES}; do
uuencode "${File}" "$(basename ${File}"
done | mailx email@id.com
This works as expected, meaning emailing the files as attachments but with null body. Now what I want is a way to have the Body list the files in order e.g.
... (8 Replies)
Discussion started by: nexional
8 Replies
9. Shell Programming and Scripting
hi,
i am trying to send a pdf attachment which has a name of 200 characters using uuencode and mailx. But the email is not getting delivered.
uuencode <filename.pdf> <filename.pdf> | mailx -s "Test" <email_id> (2 Replies)
Discussion started by: ATWC
2 Replies
10. Shell Programming and Scripting
Hello all
I am on RHEL 6.4. I have been using my bash script which mails one .csv file after zipping (myfile.csv.zip)to my Lotus Notes ID. I use uuencode with mailx to do this. Here is my command - uuencode myfile.csv.zip myfile.csv.zip | mailx -s "Subject" mailid. This all works very cool. Now... (3 Replies)
Discussion started by: krsnadasa
3 Replies
UUENCODE(1C) UUENCODE(1C)
NAME
uuencode, uudecode - encode/decode a binary file for transmission via mail
SYNOPSIS
uuencode [ source ] remotedest | mail sys1!sys2!..!decode
uudecode [ file ]
DESCRIPTION
Uuencode and uudecode are used to send a binary file via uucp (or other) mail. This combination can be used over indirect mail links even
when uusend(1C) is not available.
Uuencode takes the named source 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 remotedest for recreation on the remote system.
Uudecode reads an encoded file, strips off any leading and trailing lines added by mailers, and recreates the original file with the speci-
fied mode and name.
The intent is that all mail to the user ``decode'' should be filtered through the uudecode program. This way the file is created automati-
cally without human intervention. This is possible on the uucp network by either using sendmail or by making rmail be a link to Mail
instead of mail. In each case, an alias must be created in a master file to get the automatic invocation of uudecode.
If these facilities are not available, the file can be sent to a user on the remote machine who can uudecode it manually.
The encode file has an ordinary text form and can be edited by any text editor to change the mode or remote name.
SEE ALSO
atob(n), uusend(1C), uucp(1C), uux(1C), mail(1), uuencode(5)
BUGS
The file is expanded by 35% (3 bytes become 4 plus control information) causing it to take longer to transmit.
The user on the remote system who is invoking uudecode (often uucp) must have write permission on the specified file.
4th Berkeley Distribution April 24, 1986 UUENCODE(1C)