Make sure that the client you use to open an read the email, doesn't have an activated option to put attachement as 'inline text' (i think there is such an option in Thunderbird for example).
I have tried your code as well which works fine except for one thing. Assuming 'Hi' is not a file, you could use echo to instead of cat.
As suggested by ctsgnb there could be problem in your email client. However can you post your full code..
Email should be recieved with two attachments and the email body should only contain "Kindly refer the attachment"
Actual Result:
Quote:
Email is recieved with no attachments and the file contents are printed in the email boby and it looks like as shown below
Kindly refer the attachment
aa bb cc(file1 content)
dd ee ff(file2 content)
could be shorten
are useless (except for interactively controlling the variable have correctly been assigned but echo $File1 $File2 would do the work as well
You could also have a look at this thread, maybe you are experiencing the same kind of problem.
Give a try to the following :
run your script, but change the email address, send it to some external mail address like something@gmail.com adress or any other mail provider, and check how you get your attachment (attached or inline text ?).
I think your script is ok, i suspect the problem is on the reception-side.
Hello,
I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned nicely matching name and counts.
I could do each file at a time, which will take hours to finish,... (8 Replies)
Hello Folks,
I am looking for the script which will go to directory and check for the latest 5 files and send a mail to attaches these files to user.
Kindly guide.
Regards (7 Replies)
Hi Experts,
i need your help here
:confused:
Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell.
Thanks in... (9 Replies)
I need to attach all files starting with 'BusinessReport' using mutt command.
It could be any number of files in that directory, say BusinessReport_01, BusinessReport_03, BusinessReport_04 etc.
Is there a way to attach all files where filename like BusinessReport_* and sent it using mutt... (2 Replies)
Hello,
I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line".
Thanks (4 Replies)
Hi,
I am trying to get an email sent out by the unix ( aix ) system that has a .gz file attached to it.
I can get the attachment, but it's not working when being looked at from outlook.
I think there is a problem because of the way I am doing it, and the fact that it's binary.
I am trying to... (15 Replies)
if test.dat is the file
cat test.dat|uuencode test.dat|mailx -s "subject" mailid
can be used for attaching test.dat
how can i attach more than one file to a mail using mailx (2 Replies)
Hello All,
I am maintaining a server and I use pine as MUA and sendmail as MTA. Suddenly many users in the network face the problem of not being able to attach files using pine. I checked the sendmail.cf file and found a variable "MaxMessageSize = 1000000". Eventhough the message size... (2 Replies)