Email Importing

Email importing imports support ticket email replies, and can import email from multiple domains.

  • Email piping and email importing use separate configurations and are distinct methods of importing email replies.
    • We recommend using email piping if you use cPanel & WHM and only import email replies from one domain.
    • We recommend using email importing if you use other control panels or if you want to import email from multiple domains.
  • Your mail service provider is separate from your configuration for email importing. You can update this configuration at Configuration () > System Settings > General Settings in the Mail tab.

Service Providers

WHMCS can import email through several different service providers, including POP3 or IMAP, Google, and Microsoft®. If you use WHMCS’s Google or Microsoft integrations, you can get the full benefit of those services’ additional features, including OAuth2, which provides more security than traditional username-and-password authentication.

  • Microsoft email services are available in WHMCS 8.6 and later and support all Microsoft Azure®-compatible email services.
  • Google supports email via Gmail™.

Configuring Email Importing

To configure email importing for a support department:

  1. Set up your email accounts:
    • For POP3 or IMAP, create a unique email account on your mail server for each support department.
      This must be a mailbox; an alias is not sufficient.
    • For Google or Microsoft, configure your mail service provider and create an app for it.
  2. In WHMCS, go to Configuration () > System Settings > Support Departments.
  3. Create a new department and enter the top section of information or, for existing departments, click Edit.
  4. Enter the email information for the department:
    1. Select a service provider.
    2. Enter the appropriate details for your service provider.
    3. If you selected OAuth2 as your authentication type for Google, enter your email address and the ClientID and Client Secret values that you generated. Then, click Connect.
  5. Set up a cron job to run the pop.php file using the Ticket Importing using Mail Importing (POP3/IMAP) command that displays at Configuration () > System Settings > Support Departments.
    Importing Cron Commands
    We recommend that you set this to run every five minutes.

The system will delete email in the source mailboxes upon successful import into WHMCS.

Security and OAuth2

OAuth is a technology that authorizes apps or services like WHMCS to access another service, such as a Gmail account. It’s more secure than traditional username-and-password authentication. In addition to its security benefits, some mail providers require OAuth or have announced a requirement for it in the future.

  • WHMCS includes OAuth authentication support for email importing through Gmail in WHMCS 8.1 and later.
  • To use OAuth for Gmail email with WHMCS, you will need to both configure Gmail as your mail service provider and create an app for it in the Gmail Cloud console.
For steps to enable email importing with Google, see Set Up Email Importing with Google.

RFC 3834

In WHMCS 8.1 and later, the system sends support emails with RFC 3834-compliant headers by default.

  • You can disable this at Configuration () > System Settings > General Settings in the Mail tab.
  • Regardless of your settings, WHMCS will not accept email that contains the Auto-Submitted header via email piping or email importing.

Blocked Support Email Replies

WHMCS may block email replies from being imported into existing support tickets for several reasons:

  • The sender is unregistered.
  • The sender is not a CC recipient.
  • The sender is not associated with the support ticket’s client account.

As of WHMCS 8.3, blocking only occurs if you have disabled Allow Insecure Imports in the Support tab at Configuration () > System Settings > General Settings. If this setting is disabled and blocking does occur, you can still view these replies and import them manually.

Import Blocked Replies

To view and import blocked replies:

  1. Go to Support > Support Tickets.
  2. Click on the desired ticket.
  3. In the Blocked Replies message, click on the ticket ID and subject for the desired reply. The reply’s sender, subject, status, contents, and other information will appear. You will only see this message and its contents if there are email replies to import.
  4. Click Ignore Error and Import.
  5. Repeat this process for any other listed email replies that you want to import.

Support Ticket Mail Import Log

You can also view and import blocked replies in Support Ticket Mail Import Log at Configuration () > System Logs.

Last modified: May 22, 2024