Docs

Mail

Connect ITFlow to your mail - sending invoices, replies and alerts, and reading your support mailbox to turn email into tickets - and check what goes out.

In ITFlowAdminSettingsMail WhoAdmins

ITFlow sends a lot of email - ticket replies, invoices, quotes, reminders, alerts - and can read your support mailbox to turn incoming email into tickets. Both are set up in Admin > Settings > Mail, on its tabs: Sending, Receiving, From Addresses, Tests and Previews. A green dot on Sending and Receiving means each is set up.

Sending

Under Send through, pick how email goes out:

  • An SMTP server - with a username and password - your own mail server, or a service such as SMTP2GO, Mailgun or Amazon SES
  • Google Workspace - signed in with OAuth
  • Microsoft 365 - signed in with OAuth
  • Off - ITFlow sends no email at all, and keeps nothing to send later

For a server, type the Server, Port and Encryption (STARTTLS, usually port 587, or SSL/TLS, usually 465), and the Username and Password it signs in with. Many hosts want an app password rather than the account's own.

Mail settings, sending through an SMTP server
Sending: how email goes out

For Google or Microsoft, register an app with them and put its details under The app - Client ID, Client secret and, for Microsoft, Tenant ID - then connect the mailbox. The page gives you the Redirect address to paste into the app registration. Sending and receiving share the same app.

Under Pace, Emails a minute is the most ITFlow sends in a minute - 30 to start, which is what Microsoft 365 takes from one mailbox. The rest wait their turn in the mail queue: password links and invites first, as someone is waiting for them, and email from the contacts or clients list (Bulk actions) last. Raise it only if your mail host takes more - past its limit, a host turns email away.

Microsoft 365 through Microsoft Graph

Microsoft 365 can send email and read your support mailbox through Microsoft Graph instead of SMTP and IMAP. The mailbox then doesn't need SMTP AUTH, which Microsoft switches off by default.

  1. In Microsoft Entra, open the app registration and go to API permissions.
  2. Add the Microsoft Graph delegated permissions Mail.Send, to send, and Mail.ReadWrite, to read the mailbox. If ITFlow reads or sends as a shared mailbox, add Mail.ReadWrite.Shared and Mail.Send.Shared too.
  3. Click Grant admin consent.
  4. In ITFlow, on the Tests tab, click Test OAuth Token Refresh. It says how email now goes.

ITFlow uses Graph for whichever it has permission for, and SMTP or IMAP for the rest - there's nothing to switch on. On the OAuth tab, Connecting the mailbox says which way email goes. ITFlow checks again every hour, and straight away when you save the app or connect again.

Connecting the mailbox, with email going through Microsoft Graph
Connecting the mailbox: email sent and the mailbox read through Microsoft Graph

Through Graph, Test IMAP checks the mailbox through Graph instead. A copy of each email ITFlow sends goes to the mailbox's Sent Items, and an email that's too big to send in one go - with big attachments - is sent in parts.

Saved passwords and secrets are never shown again. Leave a field empty to keep what's saved.

They're kept encrypted - the passwords, the OAuth client secret, and the tokens ITFlow signs in to Microsoft 365 and Google with - under a key made from the backup key in config.php, so a copy of the database alone can't sign in to your mailboxes. Keep that key safe, as Maintenance > Backup says: an install restored without it needs the passwords and secret entered again, and a warning at the top of this page says so. If ITFlow can't add a backup key to config.php, they stay as typed and the warning says that instead.

Receiving

Under Read mail from, pick an IMAP server, Google Workspace or Microsoft 365, and the mailbox to read - usually your support address. Then switch on Turn emails into tickets in ticket settings.

Every minute, the Ticket Email Parser job reads the mailbox: a new email becomes a ticket, and a reply goes onto its ticket. Every email ITFlow sends about a ticket carries headers naming the emails before it, and a reply names them back, so the reply is found by those first - even when its subject was changed, or it's a reply to all on the client's first email, sent before anyone had the ticket's number. Otherwise it's found by the ticket number in its subject, like [TCK-123] - with the prefix that ticket was given, so changing the prefix doesn't lose older tickets.

The same email landing in the mailbox twice - sent to two of your addresses that both go to it - makes one ticket. The second copy is moved to the ITFlow folder.

It takes unread email, and email someone opened in the hour before it got to it - Outlook marks an email read as soon as it shows it. Email read before that - what was already in the mailbox when you connected it, say - is left where it is. What it takes is moved to the mailbox's ITFlow folder - so is email it took but couldn't make a ticket from, which waits in Unprocessed Email for your team to sort. Email from someone who isn't a contact, at a domain no client has, stays in the inbox, flagged, unless you let in unknown senders - so ITFlow can share a mailbox with other email, and takes only its own.

Email from ITFlow's own addresses - its From addresses and the mailbox it reads - is never a ticket. Most of it is ITFlow's own email come back, such as a copy sent to the support mailbox: that's moved to the ITFlow folder, so it can't reopen a ticket or raise a new one. Anything else from those addresses - a scanner that emails the mailbox as itself, a note to self - is left in the inbox, flagged, unless you let in unknown senders. For the same reason ITFlow's own addresses are never added as CCs - not even when a client copies in the support mailbox - and nothing about a ticket is emailed to them.

Emails about a ticket start with ##- Please type your reply above this line -##. A reply keeps what was written above that line, so the email it quotes doesn't land on the ticket again. Some mail programs put a reply under the email it quotes, and some people type below the line - what they wrote below the quote is kept instead, or as well. When nothing was written above the line and their words can't be told from the quote - typed into the middle of it - the whole email goes on the ticket, with a note saying so, rather than nothing.

Who a reply is from decides what it does:

  • The client's contact, another of the client's contacts, or a CC - a client reply, which reopens the ticket. A CC's reply is named on the ticket by the name and address it came from. So is a reply from the person whose email raised a ticket with no client - they're its CC. When it answers one of the ticket's emails, it's passed on to the people following the ticket who weren't on it (see Emails about a ticket).
  • One of your agents - their own internal note. The ticket stays as it is. When it went to the client too - they answered the client's email from their own mailbox with reply to all, the support address copied in - it's their reply instead: the client has it, so it shows as emailed to them and counts as the first response, and the ticket becomes theirs when nobody has it. Nothing more is sent.
  • Anyone else, or no sender address at all - an internal note marked as from someone who isn't a contact, CC or agent. The ticket stays as it is, and the email's attachments aren't added - they stay with the email in the mailbox's ITFlow folder. Anyone can put a ticket's number in a subject, so a stranger can't reopen your tickets or add files to them.

A reply to a closed ticket is kept on it as an internal note, and the agent it was assigned to gets a notice - the admins, when nobody had it. The ticket isn't reopened. A contact or CC is emailed that it's closed and how to raise a new ticket. Anyone else isn't told anything.

A client's reply on a ticket nobody is assigned goes to the new-ticket address in ticket settings - or to the admins in the bell, when there isn't one - so someone sees it.

An email from someone at a client, with almost the same subject as an open ticket of the client's from the last week, is a reply on that ticket when it's from its contact or a CC. From anyone else, it's a ticket of its own, linked to the other as related - two people with "Printer not working" in a week may not mean the same printer.

A mailbox with other email in it

ITFlow works best with a mailbox of its own, but it can share one. With From unknown senders too off in Tickets, it moves out of the inbox only what is its own:

  • email from a contact, or from someone at a client's domain - a new ticket, or a reply on one
  • a reply to one of a ticket's emails, from anyone
  • a bounce, a delay notice or an out-of-office reply about a ticket, an email ITFlow sent, or a contact
  • its own email come back, and email from an ignored sender

Everything else stays in the inbox, as it came, with a flag so ITFlow doesn't look at it again: email from strangers, newsletters and systems that aren't a contact's, a bounce or an out-of-office for an email someone sent from the mailbox by hand, a scan a copier sends to the mailbox as itself. Nobody is told about those in ITFlow, and none is a ticket.

Two things to know when people read the same mailbox. A contact's email is always ITFlow's, so it leaves the inbox within a minute, whatever it's about. And ITFlow skips flagged email - so flagging a client's email before ITFlow has read it keeps it out of ITFlow, and clearing the flag on one it left lets it be taken, once its sender is a contact.

With From unknown senders too on, the mailbox is all ITFlow's: every email in the inbox is taken.

Sender checks

The From line of an email can say anyone. Most mail servers check who really sent an email as it arrives - SPF, DKIM and DMARC - and write what they found in its Authentication-Results header. ITFlow reads what your mail server wrote there, and an email counts as failed when:

  • DMARC failed for a domain that asks for forged email to be rejected or quarantined, or
  • SPF failed outright, with no DKIM signature passing and no DMARC result.

A failed email is treated as from a stranger, whoever it says it's from:

  • A reply on a ticket is kept as an internal note saying which check failed. It doesn't reopen the ticket, add anyone it copied in, or go on to anyone - and an email that says it's from one of your agents isn't taken as their note.
  • A new email still makes a ticket, so nothing is lost, with an internal note saying so first. Nobody it copied in is added, it gets no "we have your email", and the client's contacts who hear about new tickets aren't emailed it.
  • It never makes a new contact at a client's domain - unless you let in unknown senders, it's left in the inbox, flagged, as a stranger's email is - and it doesn't clear an address's Email bounced.

A domain that asks for nothing (DMARC p=none) is taken as before - many such domains' own email fails these checks. So is an email your mail server vouched for anyway (ARC, or Microsoft 365's composite authentication), and one with no Authentication-Results at all.

Email no one wrote

  • A bounce - a mail server saying an email couldn't be delivered - is read whether or not you let in unknown senders. With them off, that's a bounce about a ticket, an email ITFlow sent or a contact - one for an email someone sent from the mailbox by hand stays in the inbox. The contacts it failed for are marked Email bounced, the ticket the email was about gets a note saying who it couldn't reach and what their mail server said, and the agent it's assigned to gets a notice - the admins, when nobody has it or it's about no ticket. It never makes a ticket. The email it came back about is marked Bounced in the mail queue, with the reason, and so is the reply on the ticket - an invoice or quote email's bounce goes in its History. A notice that an email is only delayed is set aside. Bulk email from another of your mailboxes sends its bounces here too, when it safely can - see Bulk actions.
  • An out-of-office reply goes on the ticket it answers as an internal note, to read. It doesn't reopen the ticket, and agents don't get a notice. One that answers no ticket is set aside - or, from a stranger with unknown senders off, left in the inbox unless it answers an email ITFlow sent.
  • Email from a system, a mailing list or a newsletter still makes a ticket, so alerts you have emailed in keep working - but it's never answered, so no "we have your email" goes back to it.

ITFlow's own automatic emails - "we have your email", "that ticket is closed", a client's reply passed on - say they're automatic, so out-of-office replies don't answer them, and no one address gets more than five of them an hour. Two systems can't keep answering each other.

Website forms and Reply-To

A contact form on a website sends its email from the website - wordpress@, a no-reply address - with the visitor in Reply-To. The visitor is the one answered, and becomes the ticket's CC, so your replies reach them. It's the ticket of the client whose domain the website is on, or a ticket with no client when unknown senders are let in. The website is never made a contact, and neither is the visitor: anyone can write any Reply-To.

An email whose Reply-To is someone else at the domain it's from - an alert sent for someone, say - is taken as from them, and the ticket says which address sent it. Anyone else's email is from them, whatever its Reply-To says.

Contacts at more than one client

An address can be a contact at more than one client - someone who works for two, or a shared mailbox. Their email goes to the client whose domain it's at, else the one they last raised a ticket at, and an internal note on the ticket names the others. If it's for one of those, use Change Client on the ticket.

People copied in, and files

Anyone else in To or Cc on the email that raises a ticket, or on a reply from the client or a CC that answers one of the ticket's emails, becomes one of its CCs - so the rest of the conversation reaches them as it would by email. A reply found only by the number in its subject adds nobody: anyone can put a ticket's number in a subject, and a From line can be made up. Never ITFlow's own addresses, other addresses at your own domain, or your agents.

Files with an email are added to its ticket - the same kinds you can attach yourself, up to 15 MB each. One that isn't - another kind, or bigger - is named in an internal note on the ticket. It's still in the email as it came, Original-parsed-email.eml on the ticket, and in the mailbox's ITFlow folder.

From addresses

The address and name each kind of email comes from - System emails (alerts, password resets), Invoices, Quotes and Tickets - such as billing@ for invoices and support@ for tickets. Each has to be an address the sending mailbox may send as: itself, an alias, or a shared mailbox it can send as.

When the Tickets address isn't the mailbox ITFlow reads, ticket emails ask for replies at that mailbox, so a client's reply comes back to the ticket - see Replies come to the mailbox ITFlow reads.

Tests and previews

Tests sends a test email, checks that the support mailbox can be read, and - with Google or Microsoft - that the sign-in still works, so you see a problem before your clients do.

Previews shows every email ITFlow sends, as it goes out - with your logo, your details and your From addresses - and who gets it. Each is made on sample records, so looking sends and saves nothing. Send Me a Copy sends one to you, to see it in your own mail app.

Your own wording

The 13 emails about a ticket to clients - under Tickets - to clients - have Edit Wording. Change its Subject, Heading, Opening text and Closing text. Each starts with what it says now. Words in square brackets are filled in as it goes, as in canned responses: [Ticket], [Subject], [Contact], [First Name], [Client], [Agent], [Company], [Status], [Priority], and each email's own - [By] who replied, [When] work is booked for, and so on, listed in the window. A blank line starts a new paragraph, and an empty opening or closing text leaves it out. The message, the details, the button and the earlier messages are always there.

Save, and the preview shows it - the list marks the ones you changed Edited. Use ITFlow's Wording puts one back.

The subject always starts with the ticket's number in brackets - [TCK-123] - so a reply finds its ticket. Keep [Subject] in it, so the client's mail program keeps the ticket's emails together. The answer to someone who isn't a contact keeps its subject - "[TCK-123] We have your email" - and leaves [Subject] out, as anyone can send an email that says it's from someone else.

Previews of every email ITFlow sends
Previews: every email, who gets it, and how it looks

The mail queue

Everything ITFlow sends goes through Admin > Mail Queue. The Mail Queue job sends what's waiting every minute, up to the pace set for sending, over one connection to the mail server.

The mail queue
The mail queue: what's been sent, what's waiting and what failed

The tabs are Waiting, Sending, Retrying, Failed, Sent, Bounced and Cancelled. A failed email is tried again over about eight hours - 5 minutes later, then 10, 20, 40 and on to 4 hours apart - before it's marked Failed. Its row says why. That includes a domain with no mail server: it's looked up again on each try, as a lookup can fail for a moment.

  • An address the mail server says doesn't exist isn't tried again, and its contact shows Email bounced. Turned away for any other reason - the server's own rules, a full mailbox - an email is tried again. When it's someone copied in who's turned away, the email still goes to everyone else, once, and its row names who was turned away.
  • When the mail server turns two emails in a row away - past its limit, say, or a relay that won't send for ITFlow - the rest wait for the next minute rather than use up their tries, and admins are told.
  • When ITFlow can't reach the mail server or sign in to it, nothing is tried: email waits as it is and goes once the server takes it. The Mail Queue job says why in Maintenance > Cron.

An email can go and still come back: the mail server took it, but the server at the other end later said it couldn't deliver it, in a bounce to your ticket mailbox. That email moves from Sent to Bounced, and its row and its window say who it came back for and what their mail server said - the mailbox doesn't exist any more, say, or it's full. Email to several people is marked for those the bounce names. Sometimes it names an address the email wasn't sent to - someone has their mail sent on to another mailbox, and that one turned it away. On an email to one person, it's theirs, and says where it came back from. On an email to several, ITFlow can't tell whose it was: the email is marked Bounced with that address, nobody on it is singled out, and the reply on the ticket says a bounce came back, and from where. A bounce is matched to its email by the email's own ID, which ITFlow gives everything it sends - or, for a bounce that doesn't carry it, by the address and subject of one sent in the last week.

Admins get a notice when an email is given up on, an address is turned away for good, or the mail server can't be reached - once an hour at most.

An email whose last try was more than a day ago isn't picked up again by itself - Retry Now sends it. Tick emails to Retry Now, Cancel or Delete them. Sent, failed and cancelled email is kept for 90 days.

Click an email to see it as it went. A sent email keeps what it said, its attachments and its calendar file. One with a link or code that opens something - a shared login and its code, a client portal or agent invite, a password link, a contract to sign or a task to approve - is cleared once it's sent, so the link isn't kept where others can see it, and a day after it was queued if it failed or was cancelled. One cleared like that can't be retried: send a new one from where it came from.

If something is stopping email going out - sending switched off, or cron not running - it says so at the top.

A ticket's conversation shows the same for each email reply: who it was emailed to and whether each one was sent, is waiting, or failed. See The conversation.

Notifications

Admin > Settings > Notifications decides which emails ITFlow sends clients by itself, what it tells your technicians about their tickets, and the alerts it raises for your team:

  • Domains about to expire - an alert 45, 7 and 1 days before a domain expires
  • Ticket assigned - in the bell and Ticket assigned - by email - what a technician gets when someone else assigns them a ticket or recurring ticket. Switch either off if your team doesn't want it - the ticket is still theirs, under Mine.
  • Client replies to agents helping - the copy of a client's reply that goes to the technicians helping on a ticket. The technician it's assigned to is always emailed.
  • Email clients about their tickets - the contact and CCs hear when a ticket is raised, scheduled, resolved and closed. Off, they still get the replies your agents send.
  • Email the invoices recurring invoices make - off, they're made as drafts to check and send
  • Email a summary of the week - for the owners, see Weekly summary below

Payment reminders and statements have their own schedule, in Invoices and billing.

Weekly summary

Switch on Email a summary of the week for an email, early on the day you pick, on how the last seven days went beside the seven before: tickets opened and resolved, SLAs missed, good and not-good ratings, time logged and how much was billable, new clients and - with invoicing on - what was invoiced and paid, with your busiest clients. Under Needs a look it lists open tickets nobody has, overdue invoices, and domains and certificates running out in the next 30 days.

  • On - the day it goes.
  • Send it to - addresses, separated by commas. Leave it empty and every admin gets it.
  • Send Me One Now sends you one for the last seven days, to see what it looks like. It's also under Previews in Tests and previews.
The weekly summary email
The weekly summary: the week beside the week before, and what needs a look

It's sent by the nightly job, so cron needs to be running.

Once texting is set up, Texts to clients on the same page decides what ITFlow texts clients by itself - see Text messaging.

Notification settings
Notifications: the alerts your team gets, what technicians are told about their tickets, and the weekly summary
↑↓ to pickEnter to open