07-01-2009
Using mailx to save attachments
Hi,
I have a requirement to save a mail attachment sent from Windows to a Solaris 9 server.
I'm using mailx on the server and have seen a few examples of how to attach a file for sending but none for how to save the attachment when receiving.
I can see the encoded text when I look at the mail but have no idea how to convert it back to a file.
I understand that I can use uudecode but dont understand enough to get this happening (newbie).
Basically how do I get the file out of the mail and save it on the Solaris server?
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Could someone help me with 'Extract or save attachment of email using mailx'
Thanks,
Vijay ;) (1 Reply)
Discussion started by: kandati
1 Replies
2. Shell Programming and Scripting
Hi
I want to use mailx command to send a message included more than one file.
I tried to use uuencode in pipe but it could only generate one file.
I would avoid using an archive file :p
Thanks to read you.
Mathieu (2 Replies)
Discussion started by: madmat
2 Replies
3. 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
4. UNIX for Advanced & Expert Users
I have written the following code send multiple attachments using mailx
(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3;) | mailx -s MultipleAttachments -r Sysadmin abc@xyz.com
The attachments are coming properly if the file1,2,3 are either pdf, text, doc. But if these files... (2 Replies)
Discussion started by: ramanam2004
2 Replies
5. AIX
I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot (3 Replies)
Discussion started by: darioa
3 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
I have created a shell scripts and wanted to email users multiple attachments using mailx. I noticed that when I do a man on mailx I see and -a option for attachments. When I run a:
mailx -s "test attachments" -a include_file -a exclude_file testuser@mydomain.com
(Interrupt -- one more to... (1 Reply)
Discussion started by: metallica1973
1 Replies
8. Shell Programming and Scripting
Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint.
I have tested the script using my personal email as the destination and the... (3 Replies)
Discussion started by: mattkoz
3 Replies
9. Shell Programming and Scripting
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
10. Shell Programming and Scripting
I have created a simple log file (abc.log) with Hello World, from my UNIX script. At the end of the script, I have attached the log to my email using uuencode & mailx command.
THe email was send successfully and opening on my desktop without any issues.
I have the email sync with my iPhone... (7 Replies)
Discussion started by: karumudi7
7 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)