Reputation: 86
So I'm about ready to pull my hair out on this one. I am running ssmtp and mutt on a freeBSD jail. I have a bash script called notify that contains the following line.
mutt -s "$subject" "$email" -a "$attachment" < "$logfile3"
When I run
bash notify.sh
The email will send just fine, but if I run that exact same command from inside motioneye I receive an extremely non-descript error from mutt
Could not send the message
I have tried using a daemon but that hasn't had any effect. I wish the mutt error message was more descriptive.
Upvotes: 1
Views: 599
Reputation: 86
My script did not have access to the "sent" mailbox and therefore mutt was failing to send. -e "set copy=no"
added to the mutt call corrected the issue.
For a better walkthrough: https://gitlab.com/muttmua/mutt/issues/119
Upvotes: 1
Reputation: 34391
Make sure you have bash
installed (it isn't by default on FreeBSD) and try using absolute path to it (/usr/local/bin/bash
).
Upvotes: 0