Back

Microsoft/Office 365 SMTP

  • 0
  • Self Hosted
  • Cloud
pietrodc0
27 Sep, 2023, 17:09

Hello, has anyone succeed in using Microsoft 365 as SMTP host for the automated emails like password recovery? I'm following the following guide to configure it Microsoft side but.. big nope https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365

TL;DR
Issue: User is experiencing issues with Microsoft/Office 365 SMTP, as emails sent from Appwrite are being marked as spam. Two broken links in the email template are also causing problems. User wants to know if there is a way to prevent emails from being marked as spam and is seeking information on configuring Microsoft 365 as an SMTP host for automated emails. Solution: User discovered that allowing legacy/basic authentication for the organization and using App Passwords for SMTP resolved the issue. The following configuration was used: - Host: smtp.office365.com - Port: 587 - Use TLS: true - User: actual mailbox -
Drake
27 Sep, 2023, 17:10

what did you use for the values (exclusing user and pass) and what's the error you're getting?

pietrodc0
27 Sep, 2023, 18:12

host: smtp.office365.com port: 587 use TLS: true

user: an actual mailbox password: an App Password created from the user

I don't get errors from Appwrite (Cloud) but simply I don't receive emails. I don't even see login tentatives in the "Microsoft Entra admin center"

pietrodc0
27 Sep, 2023, 18:21

found it: I needed to allow legacy/basic authentication for the organization in order to use App Passwords for SMTP

https://learn.microsoft.com/en-gb/azure/active-directory/fundamentals/security-defaults

pietrodc0
27 Sep, 2023, 18:22

Now the question is: using <:appwrite:637383039499894787> Cloud, which is the server IP(s?) that are used to send?

I need to properly set the spf record to do not mark AW emails as SPAM

Drake
27 Sep, 2023, 20:19

that is a good question...let me check with the team

pietrodc0
28 Sep, 2023, 12:30

Any news on the topic?

pietrodc0
28 Sep, 2023, 18:37
Drake
28 Sep, 2023, 20:13

Sorry, it's been hectic. Let me follow up with the team

Drake
28 Sep, 2023, 21:13

Hmm I don't think we'll be able to publicize that info...perhaps adding some SPF record that says Microsoft/office365 is sending the email might be enough?

pietrodc0
28 Sep, 2023, 22:10

Uhm, actually as we're using SMTP AUTH it may be enough but this does not explain why it gets to the SPAM folder. I'm sending from an M365 configured domain to another M365 configured domain and the SPF is a pass looking the email's header but still it gets to the SPAM folder... need to look into that more deeper

pietrodc0
28 Sep, 2023, 22:12

thank you Microsoft for such detail 🙃

pietrodc0
28 Sep, 2023, 22:27

well, mail-tester.com gives a (good) score as 9/10 so it's some stupid Microsoft rule that marks it as SPAM.

An info that it's worth checking, as is the reason for the -1 point, is that there are 2 broken links in the base template: https://github.com/appwrite/appwrite/blob/49155a97d42a152f26e188a3910548bc209785d8/app/config/locale/templates/email-base.tpl#L5

the two Google links marked as preconnect are giving 404 and that's seen as a problem by the antispam

pietrodc0
28 Sep, 2023, 22:31
pietrodc0
28 Sep, 2023, 22:32

I believe that this Discord ticket can be marked as solved!

Drake
28 Sep, 2023, 22:51

maybe there's something about DMARC or DKIM too? 🤷🏼‍♂️ this type of stuff is really cryptic and annoying

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more