Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SMTP Templates #6932

Merged
merged 83 commits into from
Apr 11, 2024
Merged

feat: SMTP Templates #6932

merged 83 commits into from
Apr 11, 2024

Conversation

doncicuto
Copy link
Contributor

With this feature you are able to choose an SMTP template and default settings are already made, so you only have to give my configuration specific settings.

In this PR there are default settings for Amazon SES, Mailgun, Mailjet, Postmark, Sendgrid and a Generic SMTP provider. If you have known settings for other providers let me known and I'll add them during this review.

This is a video showing this feature:

mail_templates.mp4

This PR has many frontend/backend changes, some of them are breaking changes:

  • As we now are able to have many SMTP configurations an id must be used to specify the config to be updated, removed, activated or deactivated or if you want to change SMTP password. Also we must activate a provider in order to send emails.
  • golangci-lint contextcheck complained about passing context to InstanceAggregateFromWriteModel.
  • I've kept UpdateSMTPConfigPassword in API but when you create or edit an SMTP config you can send a password.
  • GetSMTPConfig API will give us the current ACTIVE configuration.

I've done my best, but I guess that many things will be wrong in backend as I'm still trying to learn more about it. I thank you in advance for your review

Closes #5503

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

@fforootd
Copy link
Member

fforootd commented Apr 3, 2024

Call me excited about this PR.

Thanks for all the hard work @doncicuto

Copy link
Collaborator

@stebenz stebenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@doncicuto I had another look, I think they are small chances that I missed but would be a good idea. Could you have a look if the comments are clear for you?

internal/command/instance_model.go Outdated Show resolved Hide resolved
@doncicuto
Copy link
Contributor Author

No, thank you and specially to the whole team reviewing this issue. I hope that things work fine and my code can be fixed and improved during this review

@stebenz stebenz merged commit d229da6 into zitadel:main Apr 11, 2024
25 checks passed
@doncicuto
Copy link
Contributor Author

Many thanks @stebenz and @peintnermax for reviewing this PR, I really hope this code works fine and looks good to you and that it will ease the configuration of different providers.

@muhlemmer
Copy link
Contributor

Thank you @doncicuto for this huge effort and seeing it through to the end! It's not easy when there are many reviewers involved 😄

@fforootd
Copy link
Member

Thank you for this superb PR ❤️

@Beatirce
Copy link

Thank you,How is Office365 configured?

@doncicuto
Copy link
Contributor Author

Hi @Beatirce, unfortunately I couldn't add a template for Office/Microsoft365 as I have no account to test against it. I created a PR on friday to add an outlook.com template and a fix that should allow login auth for smtp communication with that provider, but I've no way to test against Office365. I'm on Discord so if you or anybody interested in this feature want to contact me and provide an account to test I'd love to try (I'm not sure if Oauth with SMTP will be needed).

Copy link

🎉 This PR is included in version 2.50.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Beatirce
Copy link

Hi @Beatirce, unfortunately I couldn't add a template for Office/Microsoft365 as I have no account to test against it. I created a PR on friday to add an outlook.com template and a fix that should allow login auth for smtp communication with that provider, but I've no way to test against Office365. I'm on Discord so if you or anybody interested in this feature want to contact me and provide an account to test I'd love to try (I'm not sure if Oauth with SMTP will be needed).

Thanks,but I can't provide a test account,because I'm not postmaster,sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os-contribution This is a contribution from our open-source community released
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

SMTP Templates
9 participants