My EmonCMS is self-hosted in EmonPi running on pre-built EmonSD image (emonSD-03May16).
EmonCMS Version = low-write 9.7.7 | 2016.10.29 (Perform note 1, when error message below encounted)
Operating System = Linux 4.1.19-v7+
No change to the code.
note 1 : Selected “Update Now” in Update emonPi in admin/view of EmonCMS.
Issue:
After I create processes (i.e. condition) for sending email in Inputs and try to simulate the event, an error below appeared in Logger of EmonCMS ( /var/log/emoncms.log) :
|ERROR|email.php|check() Could not find SwiftMailer, email functions are ignored
I try to update latest EmonCMS (note 1) but the error still exist.
However I cannot say if that is a “good fix” or not, I’m not good with PHP and I find that piece of code a bit confusing as the following couple of lines seem to be a fall back for when “pear” swift isn’t installed, it appears to want to resort to using emoncms/Lib/swiftmailer/swift_required.php which doesn’t exist and presumably therefore doesn’t work.
Hi, I was having the same problem and wanted a solution that doesn’t rely in Pear as access to share hosts can be limited. Then, as Paul says, the fallback solution doesn’t work as Swift Mailer is not in the Lib directory.
To make it work I have added Swift Mailer to the Lib, also I had to tweak email.php as the swiftmailer’s newInstance() methods don’t work anymore.