M365 Shared mailbox, graph, wrong display name on customers mailclient

Infos:

  • Used Zammad version: 6.5
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04
  • Browser + version: Firefox latest

Hi,

I have connected a shared mailbox from microsoft 365 via graph, it works. I can send and receive emails.

The emails that customers receive via Zammad do not contain the display name “John Doe via Helpdesk,” but rather the name of the shared mailbox, “Test Zammad.” Can this be changed?

I checked, and it’s configured correctly in Zammad. It works as intended with a “normal” non M365 email account.

Best Regards

MrGeneration explains why this happens in one of his Zammad videos.

ok, I’m understand. thanks for replying.

No matter what I set under Sender Format, the mailbox’s display name is always displayed. I also created a new IMAP mailbox for testing, and the mailbox’s display name is displayed here as well.

I don’t think that’s the problem described in the video

If the affected person has at some point communicated with the ‘old’ e-mail address and has the ‘old’ format in their local address book, they will always see the address in that format, whatever you change on the Zammad side. That is also the reason why it works with others who haven’t communicated with the ‘old’ address. That is exactly the problem described in the video.

I created a new IMAP mailbox and started communicating with Zammad. I sent an email to Zammad from my webmail client, but there can’t be an entry in the address book. Nevertheless, the mailbox’s display name is displayed.

Does a setting need to be made in M365?

This behavior is only observed with an M365-linked email account via Graph. It works as expected with an Exchange 2019 mailbox or any other IMAP mailbox. Just tested again.

Looks like the same: MS365 Graph Api Mail channel ignores Sender Format - #6 by touro411

Currently, we would need to check what the outgoing mail includes. When it is correct, then M365 Graph is doing something on its own.

I have currently not much time to test it, so what be nice to have some example outgoing mail from this described situation :slight_smile:

No problem, I’ll describe the problem again in more detail.

The display name and separator setting:

The shared mailbox via graph:

The outgoing mail from Zammad to fresh mailbox (from any webhoster):


Things are looking okay in Zammad

The outgoing mail from Zammad to fresh mailbox (from a another webhoster):


Things are looking okay in Zammad

The incoming mail to the mailbox of the first webhosters:

The incoming mail to the mailbox of the second webhosters:
Screenshot 2025-08-19 165736

For both mailboxes, the display name of M365 is used and not the one assigned by Zammad. The sent folder also displays the display name of the shared mailbox.

If I use an Exchange 2019 mailbox or an IMAP mailbox, the display name assigned by Zammad is displayed to the recipient.

I think Zammad’s code needs to be adapted to this, if possible.

I think the problem is clear, what we need is the raw outgoing email. You can download it when you click inside the article in Zammad on “Raw data” below the “E-Mail” channel name.

ok, no problem, Here is an anonymized outgoing email:

Date: Tue, 19 Aug 2025 16:55:57 +0200
From: Max Mustermann via firma Helpdesk Support <testzammad@firma.de>
To: tempmail@firma-bpo.de
Message-ID: <20250819145556.3454.05a4da02-9b99-4118-9f97-4c92dd033c6a@helpdesk.firma.de>
In-Reply-To: <20250819145511.488871C60344@dd55814.kasserver.com>
References: <20250819145511.488871C60344@dd55814.kasserver.com>
 <20250819145511.488871C60344@dd55814.kasserver.com>
Subject: RE: TEST [Ticket#8703447]
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="--==_mimepart_68a4907d32a69_39e2c2ff08262167";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Organization: firma GmbH & Co. KG
X-Powered-By: Zammad - Helpdesk/Support (https://zammad.org/)
X-Mailer: Zammad Mail Service


----==_mimepart_68a4907d32a69_39e2c2ff08262167
Content-Type: multipart/alternative;
 boundary="--==_mimepart_68a4907d30a56_39e2c2ff082619c3"
Content-Transfer-Encoding: 7bit


----==_mimepart_68a4907d30a56_39e2c2ff082619c3
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

TEST zur=C3=BCck

> Am Dienstag, 19. August 2025 um 16:55:33, schrieb :
>
> TESt=

----==_mimepart_68a4907d30a56_39e2c2ff082619c3
Content-Type: multipart/related;
 boundary="--==_mimepart_68a4907d323a2_39e2c2ff082620b"
Content-Transfer-Encoding: 7bit


----==_mimepart_68a4907d323a2_39e2c2ff082620b
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html dir=3D"auto">
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF=
-8"/>
    <meta http-equiv=3D"X-UA-Compatible" content=3D"IE=3Dedge"/>
    <style type=3D"text/css">
      body {
        font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-seri=
f; font-size: 12px;
      }
      img {
        outline: none;
        text-decoration: none;
        -ms-interpolation-mode: bicubic;
      }
      a img {
        border: none;
      }
      table td {
        border-collapse: collapse;
      }
      table {
        border-collapse: collapse;
        mso-table-lspace: 0pt;
        mso-table-rspace: 0pt;
        border: none;
        table-layout: auto;
        display: block;
        width: 100%;
        overflow: auto;
        word-break: keep-all;
      }
      table,
      pre,
      blockquote {
        margin: 0 0 16px;
      }
      td, th {
        padding: 7px 12px;
      }
      th {
        font-weight: bold;
        text-align: center;
      }
      col {
        width: auto;
      }
      p {
        margin: 0;
      }
      code {
        border: none;
        background: hsl(0,0%,97%);
        white-space: pre-wrap;
      }
      blockquote {
        padding: 8px 12px;
        border-left: 5px solid #eee;
      }
      pre {
        padding: 12px 15px;
        font-size: 13px;
        line-height: 1.45;
        background: hsl(0,0%,97%);
        white-space: pre-wrap;
        border-radius: 3px;
        border: none;
        overflow: auto;
      }
    </style>
  </head>
  <body style=3D"font-family:'Helvetica Neue', Helvetica, Arial, Geneva, =
sans-serif; font-size: 12px;;"><div>TEST zur=C3=BCck</div><div><br></div>=
<div data-signature=3D"true" data-signature-id=3D"1">Sch=C3=B6ne Gr=C3=BC=
=C3=9Fe,<br>Max Mustermann<br><p style=3D"margin: 0;">IT Systems- &amp; N=
etwork Administrator</p>
<p style=3D"margin: 0;"><span>firma GmbH &amp; Co. KG</span></p>
<p style=3D"margin: 0;">Tel.: +49 (0) 7584 / 12345-87=C2=A0</p>
</div><div>
<br><br>
</div><div><blockquote type=3D"cite" style=3D"border-left: 2px solid blue=
; margin: 0 0 16px; padding: 8px 12px 8px 12px;">Am Dienstag, 19. August =
2025 um 16:55:33, schrieb  :<br><br><p style=3D"margin: 0;">+++ ACHTUNG: =
Diese E-Mail stammt von einem EXTERNEN ABSENDER. Klicken Sie nur dann auf=
 Links oder Anh=C3=A4nge, wenn Sie dem Absender der Nachricht vertrauen. =
+++</p>
<p style=3D"margin: 0;">TESt</p>
<br>
</blockquote></div><div><br></div><br><br></body>
</html>

----==_mimepart_68a4907d323a2_39e2c2ff082620b--

----==_mimepart_68a4907d30a56_39e2c2ff082619c3--

----==_mimepart_68a4907d32a69_39e2c2ff08262167--

Thanks for the example mail.

For me, it looks like it’s a problem on the Microsoft side, because the mail is created with the correct “From” value.
We are only sending this complete mail to Microsoft, so we are very limited here to influence this.

Maybe it’s a limitation of Microsoft Graph, we would need to check the API a little bit the API and maybe ask the Microsoft support.