Forums | Mahara Community

Support /
Failed to send welcome email.


John Doe's profile picture
Posts: 9

29 March 2023, 22:56

Dear community,

 

I am currently troubleshooting why Mahara is not sending out welcome emails. Interestingly, all other emails are being delivered without issue, so the problem appears to be isolated to the welcome email specifically.

I have already thoroughly reviewed the logs and did not find any clues related to this issue. We are utilizing an external SMTP server, specifically smtp.office365.com. Given that other emails are being sent without problem, it seems unlikely that the mail configuration is at fault.

Are there any other suggestions or areas that I could investigate to resolve this matter?

Thank you for your assistance.

Sincerely,

Jeff

Kristina Hoeppner's profile picture
Posts: 4707

30 March 2023, 9:03

Hi Jeff,

Do you have anything in the error log? We don't use Microsoft and thus don't know the ins and outs of configuring that SMTP server. I know another organisation had a problem (no idea though if it was the same). I'll see if I can find out how they fixed it.

Cheers

Kristina

John Doe's profile picture
Posts: 9

31 March 2023, 1:29

Hey Cristina,

Thanks for getting back to me.

I've configured the email flow directly on Mahara instead of the server, and the logs aren't showing any information because everything is going over smtp.office365.com, or should it go? Is it possible that Mahara is using local server configuration instead of smtp.office365.com only for the welcome email? 

Let me know if you come across any useful information that could help.

Cheers, Jeff

Kristina Hoeppner's profile picture
Posts: 4707

31 March 2023, 7:28

Hi Jeff,

I heard back from the organisation that had problems with the Microsoft server: For some reason, their email settings had a username and password that wasn't needed. I think this can happen when you work with a password manager that recognises username and password fields and fills them automatically. If you save the form without removing them, they would be saved and thus cause an issue. This is my assumption. Please double check your email settings in Admin menu  Configure site → Site options → Email settings.

Mahara doesn't have a local email server. You define the email settings yourself and they will be used for all mails, whether that's a notification that's stored also in Mahara or not when there is no account.

Thank you

Kristina

John Doe's profile picture
Posts: 9

31 March 2023, 21:54

Hi Kristina,

There has been some progress, but I still haven't found a solution. At least I now know what the problem is.

I tried to avoid using the integrated email options in Mahara and instead send emails using Postfix (where the emails normally work) directly from the server. I was able to see the logs and found that Mahara is completely ignoring the system email address and attempting to do authentication using an email address from the administrator and sending it as [email protected]. Since administrators are not allowed to send as noreply, the emails are not going through. This should not work in this way because it does not matter who triggers the email; they should use the noreply address defined in Mahara and not the user address.

This explains why all emails are normally sent except for those triggered by administrators.

I've also tested this in a browser that does not have an autofill function or password manager to avoid authentication with the administrator's email address, but the issue persists.

How can I force Mahara to use the system email address, even when the administrator triggers an email, such as when I add a new user?
I have checked the email options multiple times, and they are 100% correct.

Sincerely,

Jeff

John Doe's profile picture
Posts: 9

01 April 2023, 0:39

Here's some new information for anyone experiencing the same problem.

As I mentioned before, every time an administrator tried to add a new user, we received the following error message: "Fehler beim Senden der Willkommens E-Mail an die/den neue/n Nutzer/in."

Although all email notifications were being sent normally, the welcome email consistently failed to send. We discovered that this was because we were using an external SMTP server (smtp.office365.com) to send emails, and Mahara was attempting to send the welcome email using an administrator email address that did not have the necessary permissions to send as [email protected]. This appears to be a bug or misconfiguration in the Mahara code, and emails should not be sent in this manner.

To solve the problem, we completely removed the email configuration from the Mahara Email options and instead configured Postfix to forward all emails (regardless of the sender's address) as noreply. Authentication and all other settings were configured in Postfix.

This has resolved the issue for now, but it is not the ideal solution. It would be beneficial if this could be addressed in a future version of Mahara.

Best regards,

Jeff

Kristina Hoeppner's profile picture
Posts: 4707

22 September 2023, 10:48

Hi Jeff,

Typically, if you want to send mail from a server, you would add a SPF record to the domain record to all traffic from there. That's not a Mahara configuration, but a server configuration.

Cheers

Kristina

7 results