Microsoft 365 channel does not work while trying to send email after password change

Used Zammad Version

6.3.1

Environment

  • Installation method: source
  • Operating system (if you’re unsure: cat /etc/os-release ): Ubuntu 24.04 (arm64)
  • Database + version: PostgreSQL 12
  • Elasticsearch version: Not installed
  • Browser + version: Chrome 127.0.6533.100 (Official Build) (arm64)

Actual behaviour

The password is changed, but the UI shows error No such file or directory - /usr/sbin/sendmail. Email channel is not configured as Microsoft 365 channel is already configured successfully and expected to work as the default outbound channel

Expected behaviour

The email should be sent using the Microsoft 365 Channel and should not try to use local sendmail instead

Steps to reproduce the behaviour

  • Install from source
  • Skip SMTP setup in the browser setup flow
  • Login as admin and configure Microsoft 365 channel
  • Try changing password for the user

Suggestions:

On a quick review of the source code (6.3.1) it seems problem lies with lib/notification_factory/mailer.rb (line 165). Probably it should not use a hard coded value ‘Email::Notification’ for the area parameter. One quick fix can be use an environment variable and then use a fallback value.
e.g.
set env variable EMAIL_OUTBOUND_CHANNEL_AREA=Microsoft365::Account

mailer.rb

def self.deliver(data)

get active Email::Outbound Channel and send

channel_area = ENV[‘EMAIL_OUTBOUND_CHANNEL_AREA’] || ‘Email::Notification’
channel = Channel.find_by(area: channel_area, active: true)

Hi!

As I understood Zammad so far, channels and email notifications are two separate things.

Docs regarding system notifications: System Notifications — Zammad Admin Documentation documentation

Docs regarding MS365 channels: Microsoft 365 — Zammad Admin Documentation documentation

System notifications are used for (source, the docs linked above):

All users are notified of:

Staff (admins & agents) are notified of:

  • logins from a new device
  • logins from a new country

Agents are notified of:

  • new tickets
  • ticket updates
  • “ticket pending” reminders
  • SLA violations (before and after the deadline)

Since you skipped the initial SMTP setup (which is used for system notifications) the email is not going to be sent unless you set up the SMTP as described here: Email Notification — Zammad Admin Documentation documentation

I am not debating the possible solution of using the channels as outbound account for the system notifications as that is not in my domain.

Best,
Skip

Hi,
Thanks for the clarification. The initial SMTP setup will not work for Microsoft 365 as a (legacy) SMTP provider and hence will fail. This might force the administrators to have another provider to handle this part which does not sound convenient.

Maybe this can be picked up /reviewed by somebody who controls this area of codebase - I feel this is something which might become a priority soon.

Regards
javlin

Vote with your heart on the first article, there is a feature request for it.

I have voted on the first article.

@MrGeneration Just to add - I can submit pull request for this enhancement when I find some free time. Not sure about the process to join the repo and contribute.

1 Like

This page hopefully helps you through that:
https://docs.zammad.org/en/latest/contributing/start.html

:slight_smile: