Quote:
Originally Posted by sysmicuser
I say attachment means I say that I am not getting email with those two files.
Yes I looked in the email there is nothing in that.
Code:
begin 640 script1-part-1_31-Aug-2013.csv
<unreadable stuff>
end
begin 640 script1-part-2_31-Aug-2013.csv
<unreadable stuff>
end
Instead of 640 I see 700 because I have explicitly changed the permissions. yes I could see like that, why you ask? Is that the reason it is unable to send an attachment?
|
Your answer is confusing. You say you see nothing like the above and you say 640 is 700, which indicates that there is something present like the above.
I can only assume that the attachments _are_ part of the email and that your script works as it should.
Quote:
Originally Posted by sysmicuser
Further investigation reveals that even if I do something like this
uuencode file1.csv file1.csv|mailx -s "test" user@test.com
I am not getting email at all? However same email can be sent "outside" the shell script. I did echo $? just after this command and get return code as 0 ! all confusing
|
I'm at a loss to be honest, the script seems to be working. Only thing that comes to mind is a possible mail problem, but I'm not sure what problem that might be.
I would try to break things down in smaller pieces and try to trouble-shoot the problem that way.
- try using mail (without an attachment) from the command line.
- try using mail with an attachment from the command line.
- try a simple script that only mails a simple message (no attachment):
Code:
#!/bin/bash
echo "testing 1 2 3" | mailx -s "Testing" user@valid.address
If that works try a simple script that uses uuencode:
Code:
#!/bin/bash
echo "testing 1 2 3" > /tmp/testing
uuencode /tmp/testing /tmp/testing | mailx -s "Testing" user@valid.address
rm /tmp/testing
Do have a look at the log files to see if there are any messages related to the above (mail log comes to mind, but do check other logs as well).
BTW: Its druuna and not druna or drunna.