Could not find SwiftMailer

Do you have Swiftmailer installed?

pear channel-discover pear.swiftmailer.org
pear install swift/swift

I had the same issue, even with it installed and found editing emoncms/Lib/email.php sorted it for me.

I found the swift_required.php file was not in the Swift folder but on the same level as it

pi@emoncmsPi: $ ls -la /usr/share/php/{Swift*.*,swift*.*,Swift/Swift*.*}
-rw-r--r-- 1 root root  735 Jun 13 18:20 /usr/share/php/swift_init.php
-rw-r--r-- 1 root root 2110 Jun 13 18:20 /usr/share/php/Swift.php
-rw-r--r-- 1 root root  693 Jun 13 18:20 /usr/share/php/swift_required.php
-rw-r--r-- 1 root root  536 Jun 13 18:20 /usr/share/php/Swift/SwiftException.php

so by changing

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

to

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

seemed to do the job.

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.