help- how to reduce Size of Email attachment send via Crontab
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
help- how to reduce Size of Email attachment send via Crontab
Hi,
Below is my query- I got Mail with attachment for the below Query to my office outlook.when the Attachment size is very less- i get email from Crontab.But when my Attachment size is too long(in my case .xls has 15mb -)so no mail is coming to my outlook-because of size. pls. help me to reduce the size of the email attachment.
--------------------
cd '/home/achakra/Prasanna/Auto'
Don't demand urgent help. This isn't urgent for us.
I'm not sure what you really expect us to tell you... you need less content. You can compress it, that may well help you, so run it through gzip between the uuencode and the mailx commands.
[QUOTE=acid_kewpie;4613942]Don't demand urgent help. This isn't urgent for us.
Apologies for that . Thanks for your reply. i am new to this- so to confirm : check my below code is that fine?
-------
uuencode SAC_Tire.xlsx SAC_Tire.xls > UCD_test.xls
hi have executed below code- the attachment is getting zipped in my directory, but i am not receiving any mail,below is my code
-------
cd '/home/achakra/Prasanna/Auto'
nohup bteq <xn_sac_wk11.bteq> sac_tire.out 2>&1 &
wait
Check the size of the SAC_Tire.xls.gz file.
You have several options
1. reduce amt of data in each file, even if this means sending multiple files
2. use the gzip compression option -1 to -9 to increase compression efficiency ( -9 is best compression) http://linux.die.net/man/1/gzip
3. get your email admins to increase your attachment size allowance
4. try http://linux.die.net/man/1/bzip2 as an alternative; it has the same options eg -1 to -9 to increase compression. You may(!) get better compression ... or not ...
The size of zipped attachment is 700kb- But it has not attached.
will try above options- what you have mentioned. is the above code- correct(whatever i tried to execute)?
I tried both gzip and bzip -- My email attachment(one file- that has 15mb) is being zipped to 500kb - in my directory as SAC_Tire.xls.gz.But I didn't receive any mail .. not sure where i am making the mistake .. (when i try sending a smaller sized attachment without zipping- i got mail with attachment)
--------------------------
cd '/home/achakra/Prasanna/Auto'
mailx -s "SAC Weekly Tire Report" -r "Prasanna" `cat /home/achakra/Prasanna/Auto/mailpcp1.dat` < SAC_Tire.xls.gz
--------------------------------------------------
there is no error in logfile.?? not sure what is the mistake- can u help on this
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.