Difference between revisions of "Email Importing"

From WHMCS Documentation

m (Fixed Email Importing Integrations link)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
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 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.
 
Begin by first configuring your support ticket departments. You do this by going to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Support Departments]]''' or, prior to WHMCS 8.0, '''Setup > Support > Support Departments'''.  Add each of your departments and the email address that you assigned to them.
 
 
   
 
   
 +
Begin by configuring your support ticket departments. You can do this at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Support Departments]]''' or, prior to WHMCS 8.0, '''Setup > Support > Support Departments'''.  Add each of your departments and the email addresses that you assigned to them.
 +
 
 
<div class="docs-alert-info">
 
<div class="docs-alert-info">
 
<strong>RFC 3834</strong><br />
 
<strong>RFC 3834</strong><br />
 
In WHMCS 8.1 and later, the system sends support emails with RFC 3834-compliant headers by default.
 
In WHMCS 8.1 and later, the system sends support emails with RFC 3834-compliant headers by default.
* You can disable this at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings''' in the '''Mail''' tab.
+
* You can disable this at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings''' in the '''[[Mail Tab|Mail]]''' tab.
 
* Regardless of your settings, WHMCS will not accept email that contains the <tt>Auto-Submitted</tt> header via email piping or email importing.
 
* Regardless of your settings, WHMCS will not accept email that contains the <tt>Auto-Submitted</tt> header via email piping or email importing.
 
</div>
 
</div>
 +
 
 +
==Email Importing Service Providers==
 +
 
 +
In addition to traditional POP3 or IMAP service providers, WHMCS supports email importing via Gmail in WHMCS 8.1 and higher and via Microsoft® services in WHMCS 8.6 and higher. These integrations provide access to your mail provider via secure protocols. Some mail providers require you to use these capabilities or have announced a requirement for it in the future.
 +
 
 +
To use these service providers, you will need to both configure your mail service provider and create an app for it via either the Google console or Microsoft Azure®. For more information, see [[Email Importing Integrations]].
 
   
 
   
==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 [https://console.cloud.google.com/getting-started Google Cloud console]. For more information, see [https://help.whmcs.com/m/support_tools/l/1328652-setting-up-pop3-importing-with-oauth-via-google Setting Up POP3 Importing with OAuth via Google].
 
 
 
==Configuring Email Importing==
 
==Configuring Email Importing==
+
 
 
[[File:Cron piping.png|thumb|The cron command]]
 
[[File:Cron piping.png|thumb|The cron command]]
+
 
 
To configure email importing for a support department:
 
To configure email importing for a support department:
+
 
 
# Set up your email accounts:
 
# 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 help with this step, see our [https://help.whmcs.com/m/support_tools/l/1328652-setting-up-pop3-importing-with-oauth-via-google Setting Up Email Importing with OAuth via Google] documentation.
+
#* 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 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.
+
#* For Google or Microsoft, configure your mail service provider and create an app for it:
 +
#** For steps to enable Google, see [https://help.whmcs.com/m/support_tools/l/1328652-setting-up-pop3-importing-with-oauth-via-google Setting Up POP3 Importing via Google].
 +
#** For steps to enable Microsoft, see [https://help.whmcs.com/m/support_tools/l/1600723-setting-up-importing-via-microsoft Setting Up Importing via Microsoft].  
 
# In WHMCS, navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Support Departments]]''' or, prior to WHMCS 8.0, '''Setup > Support > Support Departments'''.
 
# In WHMCS, navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Support Departments]]''' or, prior to WHMCS 8.0, '''Setup > Support > Support Departments'''.
 
# Create a new department and enter the top section of information or, for existing departments, click '''Edit'''.
 
# Create a new department and enter the top section of information or, for existing departments, click '''Edit'''.
# Enter the email information for the department.
+
# Enter the email information for the department:
## Select a '''Service Provider'''. If you want to use OAuth via Gmail, select ''Google''. Otherwise, select ''POP3/IMAP''.
+
## Select a '''Service Provider'''.
## Enter a '''Hostname''', or, if you selected ''Google'', make sure that <tt>pop.gmail.com</tt> is already set.
+
## Enter the appropriate details for your service provider.
## Enter a '''Mail Server Port'''. Usually, this is <tt>995</tt>.
+
## If you selected ''OAuth2'' as your '''Authentication''' type for '''Google''', enter your '''Email Address''' and the '''ClientID''' and '''Client Secret''' that you generated. Then, click '''Connect'''.
## 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 <tt>pop.php</tt> file using the '''Ticket Importing using Mail Importing (POP3/IMAP)''' command on the '''Support Departments''' page every few minutes. We recommend that you set this to run every five minutes.
 
# Set up a cron job to run the <tt>pop.php</tt> file using the '''Ticket Importing using Mail Importing (POP3/IMAP)''' command on the '''Support Departments''' page every few minutes. We recommend that you set this to run every five minutes.
+
 
 
<div class="docs-alert-info">
 
<div class="docs-alert-info">
 
The system will delete email in the source mailboxes upon successful import into WHMCS.
 
The system will delete email in the source mailboxes upon successful import into WHMCS.
 
</div>
 
</div>

Latest revision as of 18:00, 9 February 2023

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.

Begin by configuring your support ticket departments. You can do this at Configuration () > System Settings > Support Departments or, prior to WHMCS 8.0, Setup > Support > Support Departments. Add each of your departments and the email addresses that you assigned to them.

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.

Email Importing Service Providers

In addition to traditional POP3 or IMAP service providers, WHMCS supports email importing via Gmail in WHMCS 8.1 and higher and via Microsoft® services in WHMCS 8.6 and higher. These integrations provide access to your mail provider via secure protocols. Some mail providers require you to use these capabilities or have announced a requirement for it in the future.

To use these service providers, you will need to both configure your mail service provider and create an app for it via either the Google console or Microsoft Azure®. For more information, see Email Importing Integrations.

Configuring Email Importing

The cron command

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, navigate to Configuration () > System Settings > Support Departments or, prior to WHMCS 8.0, Setup > Support > 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 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 on the Support Departments page every few minutes. 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.