I'm hoping someone could help me out here. I've searched everywhere and asked a friend, but can't find anything. I have a python script that reads a couple files, fixes some barcode numbers and then emails, using smtplib, the 2 files as attachments. The script runs good from the command line, both attachments are sent with the email. But, from Cron the email is sent, but the attachments are not. Does anyone know if there is a config that needs to be changed or if there should be something else in the python script to allow for Cron to send the attachments?
Here is my line in crontab, nothing fancy
15 01 * * * /home/user/folder/./script.py
I'm using cron to send other emails from python scripts and haven't had any problems. Only difference is that none of the others have attachments.
If someone has heard of this and can help out, that would be great! If you need part or all of the python code, please let me know.