Skip to content

Commit

Permalink
Fixes #742 - Added email archive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ralf401 authored Jan 21, 2025
1 parent 6072ceb commit 47f6db0
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 112 deletions.
28 changes: 2 additions & 26 deletions channels/email/accounts/account-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,33 +193,9 @@ Keep messages on server

.. _email-experts-import-as:

Import as
.. figure:: /images/channels/email/account-setup-archive-import.png
:alt: “Import as” option in email account setup dialog
:align: center
:width: 40%

How should old emails be imported?

During the import process, Zammad treats **all messages**
(including ones you've already read from months or years ago)
as if they had been sent today:
senders will receive auto-replies and tickets are created with state "new"
for each message.

Use this option to disable this behavior for messages more than two weeks
old.

.. note:: This option may not be shown if:

* all messages in your inbox are less than two weeks old
* you selected **Keep messages on server: Yes**
* you selected **Type: POP3**
Archive Mode
.. include:: ./archive-mode.rst

For more fine-grained control,
manually disable this and other :doc:`triggers </manage/trigger>`
before adding an email account,
then turn them back on once all your messages have been imported.

Email Outbound
^^^^^^^^^^^^^^
Expand Down
36 changes: 36 additions & 0 deletions channels/email/accounts/archive-mode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

.. figure:: /images/channels/email/account-setup-archive-import.png
:alt: Archive Mode dialog during email account setup
:align: center
:scale: 100%

How should old emails be imported?

During the process of setting up an email based channel, Zammad checks if emails
are present in the inbox. If Zammad detects at least one email, the archive
mode dialog is triggered and the archive mode is turned on by default.
This dialog is also present if you edit an existing email based channel.
The archive mode lets you:

- Set an archive **cut-off time**, which means: older emails are imported in
archive mode, newer ones as standard tickets (including auto-reply messages
and in state "new").
- Select a **target state** for the archived emails: in most cases you might
want to import these archived emails in "closed" state. However, if your
use case is different, you can choose another one which fits for you.

By archiving emails, their creation date and time is preserved and no automatic
actions (e.g. trigger with auto-reply) will take place. If imported
as regular tickets, the date and time is always the time of the import.

To import all emails as regular tickets, just turn the archive mode toggle off.

.. danger::
If you turn off the archive mode, Zammad treats **all emails** (even old ones)
as if they had been sent today. This means senders will receive
auto-replies and tickets are created with state "new" for each message.

If you want to differentiate even more, you have to do it manually and
disable things like :doc:`triggers </manage/trigger>` before adding an email
account, depending on your use case.

2 changes: 2 additions & 0 deletions channels/google/basic-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Keep messages on server
to clean out your inbox from time to time
to keep it below its storage limit.

Archive Mode
.. include:: /channels/email/accounts/archive-mode.rst

After successfully adding the Google account, you can adjust
the default group Zammad is going to assign incoming new tickets to.
Expand Down
10 changes: 7 additions & 3 deletions channels/microsoft365-graph/accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ After that, Zammad will ask you to assign a destination group. Select a group
which should (initially) handle the incoming tickets of this channel. You can
also specify a folder from which Zammad should fetch emails from. If you do so,
make sure that the emails are routed to this folder somehow. Otherwise you won't
receive tickets. Leave it empty to fetch all emails from the inbox. Finally,
choose if fetched emails should remain on the server or not and confirm by
clicking the **Save** button.
receive tickets. Leave it empty to fetch all emails from the inbox. After that,
choose if fetched emails should remain on the server or not.

Depending if there are already email messages in this account, the archive mode
dialog may be shown.

.. include:: /channels/email/accounts/archive-mode.rst

Now your channel is ready and can be used! If something doesn't work, have
a look at the :doc:`common errors section <common-errors>`, where you can
Expand Down
3 changes: 3 additions & 0 deletions channels/microsoft365/accounts/account-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ Keep messages on server
to clean out your inbox from time to time
to keep it below its storage limit.

Archive Mode
.. include:: /channels/email/accounts/archive-mode.rst

After adding the account
After successfully adding the Microsoft 365 mail account, you can adjust
the default group Zammad is going to assign incoming new tickets to.
Expand Down
Binary file modified images/channels/email/account-setup-archive-import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 47f6db0

Please sign in to comment.