Phpmail is used to send mainly your order notifications, contact form, and some other mails from some modules. This has nothing to do from sending mail from client mail software with pop/imap settings.
It is not the best choice for security of your account, and email deliverability, they will be stopped by very quickly and yahoo hotmail... but the most important you must hear from us, is that phpmail is a deprecated mode, and raise a security exploit in your sites because emails are without authentication !
More information : https://support.yoorshop.hosting/knowledgebase/2967/Deactivation-phpmail.html
Email sent through phpmail are of this scheme with server hostname, ie : "email@example.com"
Imagine your client who sees this, and wish to reply, he is not sure of your domain name, this is not good !
Check regularly outgoing emails from your cPanel account, section Emails : Track delivery, click 'Display all'
As a consequence, you have to use an existing email account for communicating with customers, or create a dedicated one and redirect it to another email account you want.
Finally, minimize the number of emails at one time of order because yahoo and hotmail sees the spam when several emails are sent in the same second, payment and order confirmation can be one single email...
Here is below an example with prestashop for a domain an email whose domain is hosted with us (create your email account before). If domain is not hosted with us, just replace localhost by the correct remote mailserver hostname, and you can also use SSL port 465 as in example 2 below.
(Warning : SSL with port 465 with PHP 5.6,7 does not always work properly, stay with 'None' and port 25 or 587 with 'TLS').
- You must use our DNS on your domain to be able to use local email services
- Don't activate 'double authentication' at email account level, this is incompatible with sending email from a website
Example with Prestashop :
With None + port 25 ou 587, it works well, and is enough for local, it is recommended
If you want to use a gmail account, you may use this host name instead of smtp.gmail.com :
For Wordpress, you can use this plugin :
For Magento, if not working directly, use a plugin
Ideas with external smtp :
Use Gmail for all your cPanel account :
Also, using an external smtp provider like Mailjet is ideal for transactional emails :
Read our articles about phpmail and smtp :
With external smtp servers, you must setup 'smtp' type in your CMS, or it will go on locally with php process.
Also, in 'Email Routing' of your cpanel : use 'Remote' if you also externalize the reception of your emails.