If your Perfex CRM invoices, ticket replies, or contract notifications aren't landing in your clients' inboxes, you're not alone. The default PHP mail() function is unreliable and frequently gets flagged as spam. The fix is switching to proper SMTP delivery using an authenticated email account on your own domain.
Let's get your Perfex CRM sending emails reliably, from creating the mailbox to testing the final configuration.
Why SMTP Beats PHP mail()
When Perfex uses PHP mail(), messages are sent without authentication, so receiving servers like Gmail and Outlook treat them as suspicious. SMTP uses a real mailbox with a username and password, meaning your emails are authenticated, trackable, and far more likely to reach the inbox.
Pro Tip: Always send from an address on the same domain as your CRM (e.g., crm@yourdomain.com). Sending from a Gmail or Yahoo address through your server's SMTP causes SPF/DKIM mismatches and instant spam flags.Step 1: Create a Dedicated Email Account
First, create the mailbox Perfex will send from. Pick something clear like crm@yourdomain.com or no-reply@yourdomain.com.
In DirectAdmin
- Log in to DirectAdmin.
- Go to Email Manager → E-Mail Accounts.
- Click Create Account.
- Enter the username (e.g.,
crm), set a strong password, and set a generous mailbox quota. - Click Create.
In cPanel
- Log in to cPanel.
- Under the Email section, click Email Accounts.
- Click Create.
- Choose your domain, type the username (e.g.,
crm), and set a strong password. - Click Create.
Step 2: Find Your SMTP Server Details
Both panels give you the mail settings you'll need. Look for the email account's Connect Devices or Mail Client Configuration option.
- SMTP Host: usually
mail.yourdomain.comor your server hostname - SMTP Port:
465(SSL) or587(TLS) - Username: the full email address, e.g.,
crm@yourdomain.com - Password: the mailbox password you just set
- Encryption: SSL for port 465, TLS for port 587
Note: On Hostiso servers running LiteSpeed, both ports 465 and 587 are open and pre-tuned for outbound SMTP, so you won't need to open firewall rules or contact support to get started.
Step 3: Enter SMTP Settings in Perfex CRM
Now log in to your Perfex CRM admin panel and configure the email settings.
- Go to Setup → Settings → Email.
- Set Email Protocol to
SMTP. - Fill in the fields:
- Mail Engine SMTP Charset:
utf-8 - Email Encryption:
SSL(or TLS if using 587) - Host:
mail.yourdomain.com - Port:
465 - Email:
crm@yourdomain.com - Password: your mailbox password
- Mail Engine SMTP Charset:
- Set the Sender name so clients recognize who the email is from.
- Scroll down and click Save.
Step 4: Send a Test Email
Perfex includes a built-in test button. After saving, click Send Test Email at the top of the email settings page and enter a test recipient (use a Gmail or Outlook address to check spam behavior).
If the test succeeds, you're done. If it fails, don't panic. The error message usually points directly to the problem.
Troubleshooting Common SMTP Errors
"Connection refused" or "Could not connect to SMTP host"
This is almost always a port or host mismatch. Try switching between:
- Port
465with SSL encryption - Port
587with TLS encryption
Also confirm your host uses mail.yourdomain.com rather than localhost. Using localhost with port 25 sometimes works but is far less reliable.
"Authentication failed"
Double-check that the username is the full email address, not just crm. Re-type the password carefully. If it still fails, reset the mailbox password in your control panel and update it in Perfex.
Emails send but land in spam
This means your domain lacks proper email authentication records. Add SPF and DKIM records via DNS:
DirectAdmin
- Go to Email Manager → DNS Management (or Account Manager → DNS Management).
- Ensure an SPF TXT record exists, e.g.
v=spf1 a mx include:yourdomain.com ~all. - Enable DKIM under Email Manager → SPF/DKIM settings if available.
cPanel
- Go to Email → Email Deliverability.
- cPanel will show any missing SPF or DKIM records with a Repair button.
- Click Repair to auto-generate the correct records.
Pro Tip: After adding SPF and DKIM, wait up to an hour for DNS to propagate, then send another test email. Deliverability improves dramatically once these pass.
Step 5: Configure the Email Queue (Optional but Recommended)
By default Perfex sends emails instantly, which can slow down page loads when sending bulk reminders. Enabling the email queue sends messages in the background via cron.
- In Perfex, go to Setup → Settings → Email and enable Use email queue.
- Set up a cron job in your control panel to process the queue.
Adding the Cron Job
In both DirectAdmin (Advanced Features → Cron Jobs) and cPanel (Advanced → Cron Jobs), add a job that runs every 5 minutes. Perfex provides the exact command under Setup → Settings → Cron Job — it looks similar to:
*/5 * * * * php -q /home/username/public_html/crons/cron.phpReplace the path with your actual installation directory. This single cron powers reminders, recurring invoices, and the email queue.
Keeping Perfex Fast and Reliable
SMTP fixes delivery, but a snappy CRM keeps your team productive. Perfex is database-heavy, so it benefits massively from fast storage and object caching. Hostiso plans run on enterprise NVMe storage with LiteSpeed and Redis object caching, which cuts down query and page-load times noticeably compared to standard SATA hosting. If you're running Perfex for a growing team, our Shared Hosting handles most setups comfortably, while a Cloud VPS gives you dedicated resources for heavy client volumes. And if an SMTP issue ever stumps you, our 24/7 support team can check server-side mail logs for you.
Frequently Asked Questions
Should I use port 465 or 587 for Perfex CRM?
Both work. Use port 465 with SSL encryption as your first choice. If that fails to connect, switch to port 587 with TLS. One of the two will almost always succeed on a standard mail server.
Why do my Perfex emails still go to spam after SMTP setup?
SMTP authentication alone isn't enough. You also need valid SPF and DKIM DNS records for your domain. Use cPanel's Email Deliverability tool or DirectAdmin's SPF/DKIM settings to add them, then re-test after DNS propagates.
Can I use Gmail or an external SMTP provider with Perfex?
Yes, Perfex works with any SMTP provider including Gmail and transactional services. However, sending from your own domain mailbox through your Hostiso server is simplest and avoids third-party sending limits. If you use Gmail, you'll need an app password rather than your normal login.