Aix Unix Mailx Attachments


 
Thread Tools Search this Thread
Operating Systems AIX Aix Unix Mailx Attachments
# 1  
Old 10-04-2005
Aix Unix Mailx Attachments

I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot
# 2  
Old 10-04-2005
If you search the site Perderabo used to have a post that he gave a script that could handle attachments. I don't know if it is still available since the site was updated...

I have used it and it works very well...
# 3  
Old 10-10-2005
You can send an attachment like below :-

uuencode filename filename | mailx -s "Subject" user.domain.com

If you also want Text in the mail body as well as the attachment :-

(cat somefile.txt ; uuencode filename filename) | mailx -s "Subject" user.domain.com
# 4  
Old 01-07-2009
sending mail from AIX using mailx

Hi

I'm trying to send mail using mailx from AIX 5.3 with multiple attachments and message body. I was able to perform the activity using two different commands and there are some issues with both the commands

1.
(echo "`cat ${BASE_DIR}/mail/PMS_error.txt`"; uuencode $SCRIPTLOG PMSReleaseLog.txt && uuencode ${BASE_DIR}/errors/actualdataloaderr.txt ActualDataLoadErr.txt && uuencode ${BASE_DIR}/errors/discretedataloaderr.txt DiscretionaryDataLoadErr.txt && uuencode ${BASE_DIR}/errors/evpdataloaderr.txt EVPDataLoadErr.txt && uuencode ${BASE_DIR}/errors/targetdataloaderr.txt TargetDataLoadErr.txt && uuencode ${BASE_DIR}/errors/weightdataloaderr.txt WeightDataLoadErr.txt) | mailx -s "PMS Release - Data loaded to Essbase cube but there were errors, please check the dataload error files for the detail" bscuser1@mycom.com.tr bscuser2@mycom.com.tr

This command has an issue when a file mentioned in the uuencode is not existing it gives an error and will not proceed with sending the other file.

2.
uuencode /hyperion/Hyperion/Isbank_PMS/errors/actualdataloaderr.txt ActualDataLoadErr.txt > PMS.txt
uuencode /hyperion/Hyperion/Isbank_PMS/errors/discretedataloaderr.txt DiscretionaryDataLoadErr.txt > PMS1.txt
uuencode /hyperion/Hyperion/Isbank_PMS/errors/evpdataloaderr.txt EVPDataLoadErr.txt > PMS2.txt
uuencode /hyperion/Hyperion/Isbank_PMS/errors/targetdataloaderr.txt TargetDataLoadErr.txt > PMS3.txt
uuencode /hyperion/Hyperion/Isbank_PMS/errors/weightdataloaderr.txt WeightDataLoadErr.txt > PMS4.txt
cat /hyperion/Hyperion/Isbank_PMS/mail/PMS_error.txt PMS.txt PMS1.txt PMS2.txt PMS3.txt PMS4.txt | mailx -m -s "PMS Release - Data loaded to Essbase cube but there were errors, please check the dataload error files for the detail" bscuser1@mycom.com.tr bscuser2@mycom.com.tr


I tried this script but then it is giving me an error message
mailx: Not a recognized flag: m
3.
uuencode $SCRIPTLOG PMSReleaseLog.txt > PMS
uuencode /hyperion/Hyperion/Isbank_PMS/errors/actualdataloaderr.txt ActualDataLoadErr.txt >> PMS
uuencode /hyperion/Hyperion/Isbank_PMS/errors/discretedataloaderr.txt DiscretionaryDataLoadErr.txt >> PMS
uuencode /hyperion/Hyperion/Isbank_PMS/errors/evpdataloaderr.txt EVPDataLoadErr.txt >> PMS
uuencode /hyperion/Hyperion/Isbank_PMS/errors/targetdataloaderr.txt TargetDataLoadErr.txt >> PMS
uuencode /hyperion/Hyperion/Isbank_PMS/errors/weightdataloaderr.txt WeightDataLoadErr.txt >> PMS
cat /hyperion/Hyperion/Isbank_PMS/mail/PMS_error.txt >> PMS
cat PMS |mail -s "PMS Release - Data loaded to Essbase cube but there were errors, please check the dataload error files for the detail" bscuser1@mycom.com.tr bscuser2@mycom.com.tr

I tried to do this using another command and this is not sending the message body only attachments (but this was working previously)

Can somebody help me with this?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with opening the UNIX mailx attachments on iPhone/iOS

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

2. Shell Programming and Scripting

Mailx sending attachments to personal email, but not SharePoint?

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

3. UNIX for Advanced & Expert Users

Read mail attachments in AIX

Hello All, Is there a way to read/view email attachments in AIX? Here's my scenario; I have users that will being scanning documents for digital storage. To make it easier for the users, I would like for them to scan and email the pdf version of the document directly to one of my AIX... (3 Replies)
Discussion started by: bbbngowc
3 Replies

4. Shell Programming and Scripting

Sending Multiple Attachments using MAILX

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

5. Shell Programming and Scripting

E-mailing Multiple Attachments in AIX

Hello Everyone, I'm trying to write ascript on AIX 5.3, that will e-mail all filles within a directory. But on executing a script , it sends only 1 file from the directory alongwith some Junk data. I have searched whole forum and almost used all the suggestions, but still getting same problem.... (4 Replies)
Discussion started by: Gem_In_I
4 Replies

6. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

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. UNIX for Dummies Questions & Answers

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... (2 Replies)
Discussion started by: Jublio
2 Replies

8. UNIX for Advanced & Expert Users

Problem with multiple excel attachments using mailx

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

9. UNIX for Advanced & Expert Users

sending attachments via unix

Hi, I need to send a mail attachment from the UNIX commandline. I'm using Tru64 and the mail client thats supposed receive the attached file (an excel sheet) is Lotus Notes. Can anybody help me out? (6 Replies)
Discussion started by: Abhishek Ghose
6 Replies

10. Shell Programming and Scripting

ksh : using mailx and attachments

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
Login or Register to Ask a Question