No email after update


I’ve just updated from version 9.8.3 to 9.8.8 and now I’ve got no emails and my log shows as follows:

2017-09-24 16:15:04.772|ERROR|email.php|check() Could not find SwiftMailer, email functions are ignored.
2017-09-24 16:15:04.772|ERROR|eventp_processlist.php|Email send returned error. message=‘Could not find SwiftMailer, email not sent.’


Hello Matt

Is this on an EmonPi/emonbase or a self configured install?

You could try install or reinstall of swift mailer (from linux guide:

sudo pear channel-discover
sudo pecl install swift/swift

Hi Trystan,

Many thanks for your support again.

It is a self configured install on a raspberry pi following the instructions on the emoncms site.

It has worked great for the last 9 months and through several upgrades, with the exception that only user 1 (myself) can send emails the other 2 users i have (friends at work) cannot send emails from their accounts which fail silently.

Running the code you have sent and what is on the linked webpage gives me the following:

[email protected]:~ $ sudo pear channel-discover
Channel "" is already initialized
[email protected]:~ $ sudo pecl install swift/swift
swift/swift is already installed and is the same as the released version 5.1.0
install failed
[email protected]:~ $ sudo pear channel-discover
Channel "" is already initialized
[email protected]:~ $ sudo pecl install swift/swift dio-0.0.9 redis
Ignoring installed package swift/swift
Ignoring installed package pecl/dio
Ignoring installed package pecl/redis
Nothing to install

I ran:

sudo pecl uninstall swift/swift

Which completed successfully then ran:

sudo pecl install swift/swift

Which also completed succesfully, but i still get the same error message.


To add salt to the wound, at 6.28am this morning my installation stopped working with the error “Redis enabled but not installed” although Redis is running seen as following:

[email protected]:/var/www/html/emoncms $ redis-cli ping

Having turned Redis off in the settings.php file, apart from the Redis required bits the install is now working again except it’s also not receiving MQTT messages, it is however posting MQTT messages.

Double edit:
Having left it a few hours Redis is now working correctly again despite having done nothing with the raspberry other than trying it every hour or so by turned it back on with the settings.php file also MQTT is working again, however still no emails with the same fault.


Try editing the path to swift_required.php in emoncms/Lib/email.php line 16 from

to read

    $this->have_swift = @include_once ("swift_required.php");

See Could not find SwiftMailer for more info, However I can’t guess why it would suddenly stop working unless a previous edit was lost during an update or git stash etc.

This has come up several times, personally I’m surprised it doesn’t come up more often, but the fact it doesn’t makes me wary of submitting a fix to the repo.


Sorted it out a treat, I have done a git stash as I’ve changed the number of bars in the battery icon and WiFi signal icons and i couldn’t do the update otherwise, but they are the only two things I’ve changed.