Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Greetings!
Thank you for posting this question here. To wrap up this post with a dedicated answer, it seems that you were able to resolve this by comparing the script at this URL to your code:
https://www.arclab.com/en/kb/php/how-to-test-and-fix-php-mail-function.html
That is a good reference, for anyone experiencing similar. However, it is also worth noting that there are a lot of complexities to sending email that did not exist several years ago. For that reason, one should also check their MTA logs to see if they can find out what happened when they sent an email. For example, if I’m sending an email to “jarland@gmail.com” and using Postfix on the droplet, I might run this to check the logs:
grep "jarland@gmail.com" /var/log/mail.log
Some more information on debugging Postfix logs (as it is the most common MTA, to the best of my knowledge):
https://easyengine.io/tutorials/mail/postfix-debugging
Jarland