How to write bash script to send email alerts with an attachment in CentOS 7?

127 Views Asked by At

CentOS 7. I have a python script to generate a report in csv format. I have made to script to run periodically using bash script in crontab. It works fine.

Now the report being generated and saved in local folder. I need to send email with this csv file everytime it generates. Could someone help me how to write bash script to achieve this?

I have to send it to corporate email (not public email like Gmail, Yahoo..). Any help is appreciated. Thanks.

I have tried mailx, mutt. Nothing works. I need some help here.

0

There are 0 best solutions below