Description
It seems swiftmailer has moved on to v6 which requires PHP v7+ (See documentation), that in itself is not necessarily a problem as most platforms have moved onto PHP v7+ now. However, it seems v6 no longer uses newInstance() (see the changelog) which emoncms does (see Email.php).
The PEAR channel is still available but no longer supported, so if users install using the emoncms install guide, they will still get v5.1.0 and that seems to work as expected with emoncms, even on PHP7.
The latest versions of swiftmailer are available via composer, we have previously discussed moving to using composer rather than PEAR/PECL but since the redis and mosquitto extensions are not serviced on composer it seemed daft making the switch to catch one lesser used module and lose easy access to 2 more essential extensions.
Perhaps we should put a note in the installer guides that emoncms is only compatible with swiftmailer version 5 not 6 as a temporary measure?
Perhaps if we want or need to make the jump to v6 we should look at revising both the code and the install method, (which will possibly mean using both composer and pear.pecl to get all the modules).
Otherwise if sticking with the v5 for the time being, since it isn't going to get any updates, we could include the swiftmailer v5 lib in the emoncms repo to avoid confusion and ensure the right version is available. If users install swiftmailer v6 elsewhere for other applications, emoncms would then still use the included v5 without any issues.
see https://community.openenergymonitor.org/t/input-process-send-email-is-not-working/8454?u=pb66 (and #1013)