I had a few problems with the PHP script.. http://help.madshi.net/UploadPhp.htm
Here is my tweaked and working PHP 7.1 version - which uses latest phpmailer as installed by composer and sticks with smtp sender.
https://gist.github.com/richp10/2a3350c ... 084b927e9a
Might be useful to someone..