Success email delivery to the recipients inbox (not spam) depends on the following:
Dkim and spf setup (server/domain stuff)
IP blacklist or "too cold"
The spaminess of your email content
Using PHPmail instead of SMTP
The script is not responsible of any of that and for your convenience, it includes a test mail function that you should use to test your email delivery.