@msraham
Please tell us what Operating System and version you are running.
The "mailx m" is a kludge with MIME headers to make normal unix mail readable by non-standard mail readers such as M$ Outlook.
The absence of "-m" in your version of "mailx" just means we really need to know what O/S you have.
Btw. Do you know if you have unix "sendmail" available?
Quote:
Commit point reached - logical record count 64
Commit point reached - logical record count 128
Commit point reached - logical record count 150
Btw. I have absolutely no idea where these messages come from.
Bearing in mind the parallel threads on this subject, please take two steps back and post the entire script, the call to that script, and the exact output from that script.
---------- Post updated at 01:40 ---------- Previous update was at 01:34 ----------
@scottn
Quote:
Your first for loop is completely unnecessary. Remove it.
The two loops were deliberate.
I have made a major cock-up by copying the O/Ps code into a tested construct.
It would make sense as: ---------- Post updated at 01:46 ---------- Previous update was at 01:40 ----------
@msraham
I have no idea why you removed the "ux2dos" command from the script I posted. This invalidates the command line.
If you do not have the "ux2dos" command (and bearing in mind that some unixes spell the command differently), please post what Operating System you are running because it is clearly not a mainstream commercial unix.
Last edited by methyl; 11-01-2010 at 11:03 PM..
Reason: Rewrite of critical parts of this post! And more rewrites.
For me the mailx without the -m delivers the uuencode output as a body text blob not an attachment. Maybe there is a way to work around using sendmail, or an open source mailx with -m or other mail client or other attachment capabilities.
A mail message is just a pile of text, but the clients keep you out of the headers. I have cheated using mailx -s to stick a subject, linefeed and then an importance into the header, so I suppose you could stick a whole collection of files into the header, just by emulating the text of a mail message with attachments located before the body (why not?)! After all, encoded files have no quotes in the output, so $2 is just a very long string. I have written shell scripts to disassemble email with attached word and excel, with a little help from c base 64 decoder and open source word and excel decoders, so assembling should not be that hard.
Google showed me mutt and smtp-cli, which look pretty easy to use:
The following script does needs some enhancements,
I am loading 4 files at one stretch.
1) If any of the input file is not found or missing, the script should stop loading data for other files, and should send an email notification to the user.
2) Can we use a condition here in this script like
*********
Actual Script
*********
Do one x at a time (or parallel), except the email, and everywhere you say condition say ${x}. If you want to say CONDITION, you can put:
I just got a mutt binary and installed it, and JDK 6.22 at the same time. The right tool saves a ton of code. And non-root depot installs on on HPUX are tough.
Hi All,
I want to send multiple CSV file using below code. In Result folder, we have multiple CSV files. However, I want to catch only Summary CSV files.
I was trying using *, % with different combination. However, not able to do so.
From below code, I could send only one file... (1 Reply)
Hi All,
I want to send each file to each email id as below.
Instead of writing saparate 10 mail commands
can we do it in a simple step.
file1.csv to raghu.s@hps.com
file2.csv to kiran.m@hps.com
file3.csv to kenni.d@hps.com
file4.csv to rani.d@hps.com
file5.csv to sandya.s@hps.com... (2 Replies)
Hi All,
I am pretty new to the mail service in Sun Solaris 5.10. If anybody help me in writing a script for the multiple recipient with subject and the body would be a helpful.
Kindly help...
Thanks in advance. :)
Warm Regards,
Pramod (5 Replies)
Hi,
I have a requirement to send a mail with multiple files attached to it and along with the text message in the mail.
I am trying sumthing like below but it only sends me the text message and no files attached to the mail.
----------------------------------------
( uuencode file1... (1 Reply)
Hi,
I need to zip 4 files and send an email attaching the zipped files...
Pls help..
Win
---------- Post updated at 10:49 AM ---------- Previous update was at 10:36 AM ----------
Hi,
I need to convert 4 text files into xls,zip these 4 files and send an email attaching the... (2 Replies)
Hi,
I am trying to send an email to multiple IDs from Unix script. I have given the EmailIds in a file and trying to use the file as input in the script.
> cat Email
EmailID = "abc@xyz.com cbz@xyz.com"
In my script I have
. /Email
mailx -s "subj" $EmailID
This fails with the... (3 Replies)
Hi,
I am executing the following command in order to send a file as an attachment:
mailx -s "Subject" emailID@xyz.com < Testfile.txt
Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an... (7 Replies)
Hi,
I would like to send an email with more than one attachement. I am using uuencode. I want to achive by suing uuencode. Also please let me know other ways.
-Thambi (7 Replies)
Hi All,
I am currently using the following script to send the single file to one/more email addresses. I need to send mutilple files at same time, are there anyway I could modify the script or write new one to accomplish the same.
Script
***************
#!/bin/ksh
# Author: Manish... (4 Replies)
Hi Everyone,
I'm using the uuencode command with the mail command to send out emails through a UNIX script. The problems is that i have a number of gif files that i need to attach to a single email but the number and name of the gif files is not static. Example today the folder home/Desktop may... (4 Replies)