Jump to content

How can I set up Office365 to effectively work with WHMCS' Email Piping feature?


Recommended Posts

  • WHMCS Staff

Question: How can I set up Office365 to effectively work with WHMCS' Email Piping feature?

Office365 (herein referred to as "O365") offers an external email service provided by Microsoft that isn't hosted on the same server as WHMCS. This means the standard method for importing emails received to an O365 mailbox into the WHMCS support ticket system is to use the POP3 importing method.

You may like to use the Email Piping option instead. This guide shows how this can be achieved using O365 and a cPanel server.

As O365  is an external service that isn't hosted on the same server as WHMCS, to achieve the best results, this will require a second domain name. This can be anything you like. Nobody ever needs to see or know about it.

For this example, whmcs.COM is my main domain (connected to O365) and whmcs.NET is my secondary domain (Emails hosted in cPanel with WHMCS - Notice the different TLDs).

Today, we will be setting up whmcs.net to pipe emails from whmcs.com email addresses to WHMCS. The steps are fairly straightforward:

Create a forwarder for your "Pipe" email in cPanel

It's important to immediately note that cPanel does not require an email address to be set up in order to use Email Forwarding therefore, we won't be running through these steps.

You only need one "Pipe" email address. WHMCS will be able to determine which email address a message was originally sent to before your "Pipe" email.
 

  1. The first thing we need to do is log in to cPanel. This is fairly straightforward and the easiest way is via one of two ways:
    -  Via a redirect: Navigate to https://yourdomain.com/cpanel
    -  Via a dedicated subdomain: Navigate to https://cpanel.yourdomain.com
    cPanelForwarders1.PNG
  2. Once you have logged in to cPanel, you will need to navigate to the Email category and click "Forwarders".
  3. From inside the "Forwarders" page, click "Add Forwarder"
    cPanelForwarders2.thumb.png.9f62a7afe0f0ae7f51be19cf2af903fe.png
  4. Add a new Forwarder
    - In "Address to Forward", choose a name for your pipe email - We used "tickets" (This email can be absolutely anything you like however) which will create a forwarder for "tickets@whmcs.net"
    - Click "Advnaced Options" to show further forwarding options
    - Select "Pipe to a Program" and in put the path to your "pipe.php" file. (Pro Tip: You can get this from Setup >> Support >> Support Departments at the top of the page!)
    cPanelForwarders3.thumb.png.534c9381777d94eb1fb7f35620908e48.png
    You will receive a success message similar to: "All email sent to ”tickets@whmcs.net” will now be copied to “|/home/whmcs/public_html/whmcs/crons/pipe.php”."
  5. That's it! You've finished configuring your "pipe" email.

 

Create a shared mailbox on O365 with your publicly visible support email address.

To perform the following tasks, you must be an Organisation Administrator on Office365. If you are not, please ask your System Administrator to perform these steps:

  1. In the O365 Admin Area, click "Groups" on the sidebar and select "Shared Mailboxes". You can find the Admin Area for O365 by navigating to https://portal.office365.com and clicking the "Admin" tile.
    cPanelForwarders4.thumb.png.cda863434e62b6157022b20e2aefe3f1.png
     
  2. Click "Add a Mailbox" - A new sidebar will open. - In here, set up your new Shared Mailbox. For example:
    - Name: WHMCS Support (Or any other name you are using for your Support Department, e.g. Sales)
    - Email: support@whmcs.com - We used "support" because the department we're setting up will be "Technical Support".
    cPanelForwarders5.png.cc1c36cf889df60006a0310acd834fb8.png

    - Make sure to click "Add" once you're ready to create this mailbox.
  3.  Once created, this is the email address you must use in your Support Department configuration.
    cPanelForwarders6.thumb.png.ebd823a696181059754918808226b0a6.png

    Pro Tip: Occasionally, it may take up to 15-20 minutes for O365 to provision your new Shared Mailbox. You may need to wait until this has been completed before you can move on to the next step.
  4. On the "Shared Mailboxes" page, click on your newly created Shared Mailbox to edit it's settings. In here, you'll need to find "Email Forwarding" and click "Edit"
    cPanelForwarders7.png
  5. Configure your Email Forwarder to forward to your "Pipe" email hosted on your cPanel server with WHMCS.
    - Enable the "Forward all email sent to this inbox" setting
    - Input your "Pipe" email into "Forwarding Address"
    - Disable "Keep a copy of forwarded email in this inbox" (Unless you want to keep the originals for any reason - Records perhaps?)
    - Save the changes.

    cPanelForwarders8.png.556555a335479036f0a64cd19b53c7e1.png
  6. That's it. You're done!

So how exactly does this work?

When O355 forwards the email to your cPanel server, it retains the original "To" address. WHMCS reads the original email headers and so will be interpreted as being sent to support@whmcs.com, even though you are piping it in via tickets@whmcs.net.

As long as the email address that the message was originally sent to is configured in a Support Department (in this case support@whmcs.com), WHMCS will import the email in to this department.

Emails sent from WHMCS will show the "From" address of the Support Department (e.g. support@whmcs.com) and so nobody will ever see or know about your tickets@whmcs.net email address.

Step-by-step the processing work like this:

 

For example:

  • Your client sends an email to support@whmcs.com
  • Office365 receives this email, acknowledges that you have a forwarder active and passes the message over to tickets@whmcs.net
  • Your cPanel mailserver which houses tickets@whmcs.net receives the email and delivers it. The email still shows that it was to support@whmcs.com.
  • As your cPanel server delivers the email, it is piped by your forwarder in to WHMCS. As the email still looks like it was sent to support@whmcs.com, WHMCS knows exactly which department to open a ticket in.
  • Success! Your email is received and processed by WHMCS.
Link to comment
Share on other sites

  • WHMCS John featured, locked and unlocked this topic
  • WHMCS John locked this topic
  • WHMCS John unlocked, unfeatured, locked and featured this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated