that error was corrected in 7.7.1, iirc. are you still in 7.7.0, or have you updated to the latest version, which covers those email issues?
https://www.ubbcentral.com/forums/ubbthreads.php/topics/262141/7-7-1-changelog-discussion[FIX] (PHP 7.1+) Fixed new Member registration error when sending them an email.