I want to check the mail attachement size before sending the mail.
I coded:
But I want to know the quantifier.
To get the XBYTES, I used
into a variable, now, if I want to check XBYTES > 15 MB, what is that I have to code ?
I coded XBYTES > 15728640
ie.1024*1024*15
I want to make sure this is right. Please let me know if I am wrong.
Also, in /etc/mail/sendmail.cf, I see
Does that mean there is no limit on message attachments/ messages ? Where could I see the limit ?
Moderator's Comments:
Use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks.
The leading hash sign means that the lines are comment lines.
Thus the maximum size of an attachment is "unlimited" (well at least not by sendmail). Many ISPs will not allow a 15 Mb attachment.
The test in your script will obviously only work on a O/S where "ls" displays the file size in bytes.
The test in your script will only work for numbers up to 2147483647 .
((1024 x 1024 x 1024 x 2)) -1) . One byte less than 2 Gb.
This is a restriction on the maximum size of an integer in a Shell variable.
Hi,
I need to send attachment with email as external attachment. Presently, we are using uuencode to make an attachment but it is going as content of body. We are using below command.
uuencode "filename1" "filename2" | mailx -r "$SENDFROM" ${SENDTO}
In unix box, -a is not supportable... (1 Reply)
Hi All,
my requirement send a mail with attachment a abc.txt file.
below is the shell script.
#!/usr/bin/ksh
set -x
#DIR=/appldata/download/mail
MAILTO="krupa.behera@kk.com"
SUBJECT="Report"
BODY="Hi All,"
ATTACH=/projects/psoft/hrdw/pushreports/crons/temp_out... (5 Replies)
Hi All,
I am new to unix. I have written the script to identify the delimiter count for my source file and the output I have to capture in another file and that file should sent to mail with attachment. I have tried to send the attachment with below script . But I am not able to do that. Any... (2 Replies)
Hi
The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment .
cat Employee.sql
SET VERIFY OFF
SET PAGESIZE 200
SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
HEAD... (0 Replies)
Hi
Could someone help me with the details on how to send an attachment through mail in unix.
I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps.
Regards
Ajay (2 Replies)
Hi ,
I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Hi,
I am facing an issue while sending a mail from unix with attachment.the issue is i am able to send a mail with attachment but...after receiving the mail if u see that the text is continous though it was line by line in original..
UUENCODE is the cmd i am using...
plz help me in this... (1 Reply)
This question has been asked many time before. I did search other questions. But was not able to work out.
Really sorry for repeating the same question.
I have mail and mailx and sendmail installed.
It Tried this
uuencode FILENAME.txt FILENAME.txt | mail mymail@yahoo.com
the attachment... (3 Replies)