Config Sendmail
The problem was getting “Mailing to remote domains not supported”
The fix turned out to be:
sudo dpkg-reconfigure exim4-config
It had been set to local so was changed to
internet site; mail is sent and received directly using SMTP
then putting in system name rather than just Ubuntu
System mail name: yourdomain.co.uk
The rest you can just use enter to accept the defaults