Skip to main content

Troubleshooting Mails via Microsoft Graph

This guide describes known issues that can occur when using or migrating an ADITO MailServer or MailRepository to Microsoft Graph. It focuses on differences between SMTP-based sending and Microsoft Graph-based sending, especially when sent messages are expected to appear in the Sent Items folder.


Sent Emails Are Not Stored in Sent Items

When a mail server is migrated from IMAP and SMTP to Microsoft Graph by using the MailServer Graph alias, sent emails may no longer be stored automatically in the Sent Items folder. This behavior is caused by differences in Microsoft Exchange Online when emails are sent through SMTP compared to Microsoft Graph.

When SMTP is used for sending emails, Microsoft Exchange Online usually stores sent emails automatically in the sender's Sent Items folder. As a result, emails may appear in Sent Items even if storing sent emails is not enabled in the ADITO server settings.

When Microsoft Graph is used for sending emails, sent emails are not stored automatically in Sent Items in all scenarios. The sender must explicitly request that the email is saved. For shared mailboxes, Microsoft Exchange Online may also require additional mailbox settings before sent emails can be stored in the shared mailbox's Sent Items folder.

info

The behavior described in this guide applies to emails sent from JDito processes with mail.sendMail or mail.sendMailAs.

Cause A: Saving Sent Emails Is Not Enabled in ADITO

For emails sent through JDito processes, ADITO controls whether sent emails are explicitly stored in the sender's Sent Items folder. This behavior is configured with the project preference mailProcessUseOutbox.

By default, storing sent emails in Sent Items is disabled for mail servers that are called from a JDito process. This applies to all ADITO mail servers, regardless of whether the underlying implementation uses SMTP or Microsoft Graph.

If mailProcessUseOutbox is enabled, ADITO stores sent emails in the Sent Items folder of the user that is used for sending. When Microsoft Graph is used, the MailServer Graph implementation explicitly sets the saveToSentItems flag for the sent message.

For additional background information about SMTP submission behavior in Microsoft Exchange Online, see the Microsoft documentation: Message storage and concurrent connection throttling for SMTP Authenticated Submission.

Solution: Enable mailProcessUseOutbox

To store sent emails explicitly in Sent Items, set the project preference mailProcessUseOutbox to true.

The preference is located under _____PREFERENCES_PROJECT > Modules > Email > SheetTab: Processes > mailProcessUseOutbox.

preferences_mail_mailProcessUseOutbox.png Figure: Project preference for enabling storage of sent emails in the outbox.

After saving and deploying the preference, emails sent during the next JDito process execution are stored in the sender's Sent Items folder.

note

This setting only controls whether ADITO requests storage of sent emails. For shared mailboxes, additional Microsoft Exchange Online settings may still be required.

Cause: B Shared Mailbox Does Not Store Sent Emails in Sent Items

When a shared mailbox is used as the sender, Microsoft Exchange Online may not create entries in the shared mailbox's Sent Items folder by default. This can happen even if mailProcessUseOutbox is enabled and the Microsoft Graph saveToSentItems flag is set correctly.

In this case, the issue is typically caused by missing or inactive Exchange settings for the shared mailbox. Microsoft Exchange Online must be configured to store copies of messages that are sent as, or sent on behalf of, the shared mailbox.

Solution: Configure Sent Items Handling for the Shared Mailbox

To store sent emails in the shared mailbox's Sent Items folder, enable the relevant Exchange settings for the shared mailbox. The required options are copy items sent as this mailbox and sent on behalf.

For configuration details, see the Microsoft guidance: How to save to Sent Items folder when sending an email from a shared mailbox.

After the Exchange settings have been applied, emails sent from the shared mailbox should be stored in the shared mailbox's Sent Items folder.

warning

Changes to shared mailbox settings are performed in Microsoft Exchange Online and usually require administrative permissions. Verify the configuration with the responsible Microsoft 365 or Exchange administrator.