I have a script that results in an email being sent out with smtplib.SMTP python module.
When I run it from within IDLE is sends fine with no error messages. I am trying various ways to automate it with crontab to go everyday at 10am.
If I run it from terminal, I get an error:
$ python endofmonth.py
Traceback (most recent call last):
File "endofmonth.py", line 74, in <module>
s.send_message(msg)
AttributeError: SMTP instance has no attribute 'send_message'
Why would it work in IDLE but not when called from terminal?