Email Importing
Email importing is distinct from email piping and requires a different configuration. We recommend using email importing instead of email piping if you use any control panel other than cPanel or if you want to import email from multiple domains.
Email Importing with OAuth
WHMCS 8.1 and higher introduces support for email importing using OAuth with Gmail. OAuth provides access to your mail provider, and is more secure than traditional username-and-password authentication. Some mail providers are requiring OAuth, or have announced a requirement for it in the future.
To use OAuth for Gmail with WHMCS, you will need to both configure Gmail as your mail service provider and create an app for it in the [Google Cloud console].
Configuring Email Importing
To configure email importing for a support department:
- Set up your email accounts:
- For email importing with OAuth, configure Gmail as your mail service provider and create an app for it in the Google Cloud console.
- For non-OAuth email importing, create a unique email account on your mail server for each support department. This must be a full inbox; an alias is not sufficient.
- In WHMCS, navigate to Configuration () > System Settings > Support Departments.
- Create a new department and enter the top section of information or, for existing departments, click Edit.
- Enter the POP3 information for the department.
- Select a Service Provider. If you want to use OAuth via Gmail, select Google. Otherwise, select Generic.
- Enter a Hostname, or, if you selected Google, make sure that pop.gmail.com is already set.
- Enter a POP3 Port. Usually, this is 995.
- Select your Authentication type. If you want to use OAuth via Gmail, select OAuth2. Otherwise, select Password.
- Fill out the remainder of the form:
- If you selected Password as your Authentication type, enter the email address and password for the email account that you created.
- If you selected OAuth2 as your Authentication type, enter your Email Address and the ClientID and Client Secret that you generated through Google. Then, click Connect.
- Set up a cron job to run the pop.php file using the Ticket Importing using POP3 Import command on the Support Departments page every few minutes. We recommend that you set this to run every five minutes.
Deleted Email
The system will delete email in the source mailboxes upon successful import into WHMCS.