# Email Piping

https://docs.wisecp.com/uk/email-piping

Turn messages sent to department mailboxes into support tickets, decide which senders are accepted and connect each department to a local or external mail provider.

## Reaching the Screen

Open **Support Settings** and choose **Email Piping**: `{admin}/tickets/settings?tab=pipe`

## What Is on the Screen

Global rules appear first. Provider credentials are configured once for the installation, while sender and mailbox settings are stored separately for each support department.

## Fields

### Global Rules

- **Enable Email Pipe**: Turns the incoming-mail conversion process on or off.
- **Processing Method**: **Default** always imports incoming mail. **Associate** links a matching registered client and still imports other senders. **Restrict** creates a ticket only for a registered client's address.
- **Enable Spam Protection**: Stops mail marked as spam from becoming a ticket.
- **Email Subject Prefix**: Defines the reference prefix used in ticket email subjects, such as REF. Replies to tickets opened by email carry it as `[REF:number]` at the end of the subject.

### Providers and Departments

- **Service Provider**: Opens the configuration supplied by the selected Email Piping module. Shared client credentials are saved once and validated before department mailboxes use them.
- **Department**: Each department has its own sender identity and mailbox connection.
- **Sender Name**: The sender name customers see on replies to tickets opened by email.
- **Sender Email**: The department's mailbox address. Replies to tickets opened by email name it as the reply address, so the customer's answer returns to this mailbox. The sending address itself stays the one set in the mail module.
- **Provider**: Uses the Local Server or one of the installed provider modules.
- **Connect or Disconnect**: Authorizes or removes the mailbox connection for the selected department. The connected address is shown after authorization.

Choosing Local Server displays the forwarding command for the mail server. External providers can expose a setup guide, redirect URI, credential validation and a mailbox authorization popup.

## Tasks

### Connect a provider mailbox

1. Enable Email Piping and choose the processing and spam rules.
2. Configure the provider once, enter its shared credentials and use **Validate**.
3. Open the target department, enter its sender name and email, choose the provider and connect its mailbox.
4. Save the settings. New matching messages can now be converted into department tickets.

### Configure a local mail server

1. Choose **Local Server** for the department.
2. Copy the displayed forwarding command into the matching mailbox forwarding rule.
3. Save the department and send a controlled test message.
4. The message appears as an Email Piping ticket with its source marker.

### Reply to a ticket opened by email

1. Open the ticket, write the reply, attach files if needed and click **Send Reply**.
2. The customer receives an email with the reply text, the attached files and the reference tag in the subject.
3. The customer answers from their mail program without changing the subject.
4. The answer is added to the same ticket and its status becomes **Needs Reply**.

## Things to Watch

> **A reply without the reference tag opens a new ticket**
> 
> The tag in the subject is what links an incoming answer to its ticket. If the customer removes it, the message becomes a new ticket. Attachments are included up to 10 MB in total; larger files are left out of the email and remain on the ticket.

> **Restrict rejects unknown senders**
> 
> With Restrict selected, mail that does not belong to a registered client does not create a ticket. Use Associate when unknown senders should still enter the queue.

> **Senders without an account get no ticket button**
> 
> A sender without an account cannot open the ticket in the client area. Emails sent to them leave out the button that opens the ticket, and the conversation continues by email. It is also left out while **Allow Guest Tickets** is off, because the secure link will not open then. Text messages follow the same rule. Emails to registered clients still show the button.

> **Blocked senders never enter the queue**
> 
> A sender blocked with Block the Sender on a ticket does not create new tickets. The same applies to any address on the Email or Domain List under Security settings. The processing log records the reason.

> **Credentials and mailboxes have different scopes**
> 
> Provider client credentials are shared across departments. Each department still authorizes its own mailbox and keeps its own sender identity.

> **Google mailboxes need the Gmail API enabled**
> 
> Connecting a Gmail mailbox only authorizes the account. The Google Cloud project that owns the client credentials must also have the Gmail API enabled; otherwise no mail is fetched and the notification bell reports that the mail API is not enabled in the connected cloud project. Enable the Gmail API in Google Cloud Console, wait a few minutes and use **Test Connection**.

## Privileges

**Ticket Operations** is required to save Email Piping settings. The direct menu shortcut may be shown only to staff with administrator privilege-management access.

## Related Screens

- [Departments]({admin}/departments)
- [Tickets]({admin}/tickets)
