Why won’t my PHP app send mail? Carrie SmahaUpdated on December 6, 2022 1 Minute Read To comply with current SPAM standards involved with the PHP ‘nobody’ user, our newer servers that run PHP under Apache do not allow PHP to send mail via the mail() function, which is the default for most software. In order for you to be able to send mail you’ll need to configure the software to use SMTP with authentication, similar to how a mail client is set up. Most pre-bundled software packages like Joomla, phpBB, and other CMS’s have an option or plugin that will allow you to use SMTP instead of mail() or sendmail. Custom mailing scripts can usually be programmed to use SMTP using PEAR or the popular phpMailer class: https://github.com/PHPMailer/PHPMailer For a phpMailer tutorial, please see this guide: Using phpMailer to Send Mail through PHP To use SMTP you will need to use a valid email address that you’ve created in your cPanel. Most software will ask for these settings: Hostname: localhost OR mail.example.com Authentication: Yes Username: [email protected] Password: Your email password Port: 25 / No SSL or Port 465 / SSL Share this Article Carrie Smaha Senior Manager Marketing Operations Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth. More Articles by Carrie Related Articles Transferring Emails from Your Old Host to InMotion Hosting How to Setup Office 365 DNS Records How to fix OLMAPI32.dll and WWLIB.dll error in Outlook 2013 How to Setup Outlook 2016 for Mac Issues with Outlook 2007 Running on Windows 10 Outlook not working after installing Windows 10 IMAP Issues Affecting Outlook 2013 and Office 365 Outlook 2013/Office 365 – Subscribing to your Inbox How to create an email signature in Outlook 2003 How to create an email signature for Mac in Outlook 2011