Good evening David and welcome back!
Thank you for reaching out to us.
I would love to help you with this topic.
That snippet should still work.
Did you could apply the snippet without the PHP tag at the top ?
As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
In the meantime, there is something else worth trying is to use an SMTP plugin such as: https://wordpress.org/plugins/easy-wp-smtp/
Using a real SMTP server with authentication will bypass the built-in WP mail functionality altogether.
Please make sure you configure and test the settings using the plugin’s built-in tool.
Best regards,
Geoff B.