Sponsored Content
Full Discussion: Aix Unix Mailx Attachments
Operating Systems AIX Aix Unix Mailx Attachments Post 302274352 by Celvin VK on Wednesday 7th of January 2009 12:09:45 PM
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?
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
bntext(5)							File Formats Manual							 bntext(5)

NAME
bnmotd.txt, bnnews.txt bnissue.txt - messages for the Unix Battle.net daemon DESCRIPTION
The file bnmotd.txt contains text displayed by bnetd(1), when users first log into the server. The file bnnews.txt contains text displayed when the user uses the /news chat command. The files consist of raw text with printf-style formatting escapes. Each line of a file can contain a type formatter from the following list: %B Use the broadcast attribute (???). %C Execute the line as if the user entered it as a command. %E Use the error attribute (red). %I Use the info attribute (yellow). This is the same was %W. %M Normal chat message (white). This will appear as if the user said it. %T Emote chat message (???). This will appear as if the user said it. %W Use the warning attribute (yellow). This is the same was %I. Within a line, any of the following format formatters may be used: %% Expand to a literal percent sign (%). %a Expand to the number of accounts on the server. %c Expand to the number of channels on the server. This includes all permanent and current temporary channels. %g Expand to the number of games on the server. This includes both public and private (passworded) games. %h Expand to the hostname of the server (as returned by gethostname(2)). %i Expand to this user's account ID number, formatted with a leading pound (#) sign and leading zeros. %l Expand to this user's current chat name which is usually the same %r Expand to the IP of the remote machine (the client). %t Expand to four character client tag. %u Expand to the number of users logged into the server. %v Expand to the version number of the server. SEE ALSO
bnetd(1) AUTHOR
Ross Combs (ross@bnetd.org) 2 August, 2001 bntext(5)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy