I'm new to django and I've installed django-mailer 2.0. It's working when I manually send the queued mails: (venv)$ python manage.py send_mail
, but when I set up the crontab (which is the first time I use a cron job), it's not working. I guess there might be some mistakes in the paths.
Official documentation of django-mailer suggests:
* * * * * (/path/to/your/python /path/to/your/manage.py send_mail >> ~/cron_mail.log 2>&1)
Mine:
# first I tried:
* * * * * (/usr/bin/python3 /Users/username/Documents/GitHub/projectname/manage.py send_mail >> ~/cron_mail.log 2>&1)
# then I tried:
* * * * * (/Users/username/Documents/GitHub/projectname/venv/bin/python /Users/username/Documents/GitHub/projectname/manage.py send_mail >> ~/cron_mail.log 2>&1)
# also this:
* * * * * cd /Users/username/Documents/GitHub/projectname; venv/bin/python manage.py send_mail
# I've tried Romeo's solution as well
None is working.. Help please!
However, when I use exactly the same command in bash, it works:
$ cd /Users/username/Documents/GitHub/projectname
$ venv/bin/python manage.py send_mail
this works indeed! I'm utterly confused...
PS. about django-mailer
: I manually sent 4 queued emails each to 2 email addresses, however, 2 got missing never delivered (not lost in junk mails either). Is this normal?