There are times you can’t send the emails to address at your own domain. But you can receive mails from the other Email clients like google, yahoo. etc. This is because of the MX records setting in GoDaddy server. You’ve to enable the Remote Mail Exchanger.
This can be done by using following steps.
Step 1: Login to Cpanel
Step 2: Go to the Mail section and click on the MX Entry.
Step 3: Go to Email Routing
Step 4: Select the Remote Mail Exchanger and click on change button to enable the Remote Mail Exchanger setting.
Step 5: Now try sending Email using below snippets.it’ll work. 🙂