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
MIME message tool(1)					      General Commands Manual					      MIME message tool(1)

NAME
mime-tool - a simple program to construct MIME messages with attached files SYNOPSIS
mime [ -dDvV ] [ -S subject ] [ -F from-address ] [ -T to-address ] [ -C carbon-copy address ] [ -P prolog-text ] [ -E epiplogue-text ] [ -B boundry ] [ -O overall content-type ] { [ -78abiquxopm ] [ -t content-type ] filename } DESCRIPTION
The mime program constructs MIME messages with attached files. The user can specify the content type (application/octet-stream, text/plain or a user specified type), content type encoding (7bit, 8bit, binary, base64 and auto-detect), content disposition (attached or inline) and the content boundry string. The user can also specify some mail related options: subject, from-address, to-addres, carbon-copy addres, prolog-text and epilog-text. The output of the MIME-tool program can be sent directly to the mail, mailx or sendmail commands (or any other command that accepts RFC-822 formatted messages). NOTE: Specifying 7-bit encoding for an attachment that contains 8-bit data will convert any data bytes whose high-bit is set to question marks. OPTIONS
-7 7-bit ASCII encoding -8 8-bit ASCII encoding -a application/octet-stream content type -b binary encoding -d low detail debugging -D high detail debugging -s write a subpart -i disposition: inline (instead of attachment) -q quoted-printable encoding -c content-type explicit content type -t text/plain content type -o omit disposition line -u unknown encoding, auto-detect -v verbose messages -V very verbose messages -x base64 encoding -p copy existing MIME part -o omit content-disposition -m omit content-transfer-encoding -n filename override the filename in the disposition header -N don't add a filename parameter in the disposition header -0 no-op EXAMPLES
Using MIME-tool to write a mail message to a file: mime -S "test message" -F me@foo.net -T someone@somewhere.net file1 > test.msg Using MIME-tool with the mail command: mime -S "test message" -F me@foo.net file1 | mail someone@somewhere.net Using MIME-tool with the mailx command: mime -S "test message" -F me@foo.net file1 | mailx someone@somewhere.net Using MIME-tool with the sendmail command: mime -S "test message" -F me@foo.net file1 | sendmail someone@somewhere.net VERSION
This is version 1.5.topal3 from June 2009. KNOWN BUGS
Most of the header values are not properly quoted or folded, so long or complex values for these headers may cause problems. Specifically, the from-address, to-address, carbon-copy-address and content-type headers may not be properly quoted or folded. For some reason, certain e-mail clients (espcially from a large software company located in Redmond, Washington) don't seem to recognize file attachments as attachments, but instead displays them as inline attachments. (maybe this isn't MIME-tool's fault, but I've gotten a few e-mails about it, so I'm mentioning it here) AUTHOR
mime is written by Jeffrey Dutky <dutky@bellatlantic.net> Oscar Esteban spotted an off-by-one error in the base64 encoding function. Sergey Lapin spotted a bug in the filename header construction. Chris Hemphill noticed that the documentation (this manual page and the README file) didn't include any examples of how to call the program with common mail commands. Some additional fixes and additions by Phil Brooke to support Topal. AVAILABILITY
The original MIME-tool package can be downloaded from my web page at http://members.bellatlantic.net/~dutky This modified version is distributed with Topal: http://homepage.ntlworld.com/phil.brooke/topal/ MIME tool mime MIME message tool(1)
All times are GMT -4. The time now is 03:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy