Yes! we faced this problem many times because previously in CPanel through PHP mail() function you could send mail within a domain. for example, using mail() script you could have sent mail from [email protected]getcodify.com to [email protected]getcodify.com but now if your hosting company has enabled third-party mail delivery through PHP mail() script then you have to follow one simple step to send emails from your PHP mail script to third-party mail services like Gmail, Yahoo or outlook. After creating your email with your domain name you have to register the email which you want to use it in mail() script for sending transactional emails.
Follow the below steps:
1.Open Cpanel and check for the message as shown in below in image point 1. which tells “Attention! Please register your email IDs used in non-SMTP mails through CPanel plugin. Unregistered email IDs will not be allowed in non-smtp emails sent through scripts. Go to Mail section and find “Registered Mail IDs” plugin in paper_lantern theme.” this means you can register email/ if not also check in Email section whether you hosting enabled “Registered email ids” link as shown in below image point 3.
If you don’t have the email of your domain to use in the script then create one by clicking on email accounts as shown in above image point 2. then follow the below image for creating an account.
Then go back to the main screen as in image 1 and click on Registered Email-Ids and add the email which you need to send email in the script. as shown in below image.
In some cases, you have to wait for 30 minutes to 1 hour for activating. To check whether its active or not write a test script with PHP mail() function. as below.
Arjun is is a web developer/designer, who is fond of the web. He lives in Manipal, Karnataka, India.