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

[Feature]: Module for MailHog container for integration testing SMTP clients #1153

Open
Spelchure opened this issue Apr 10, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Spelchure
Copy link

Problem

Most of web applications need somewhat sending emails. MailHog is good choice SMTP for integration testing for sending emails. ( It also has API for checking whether email is sent or not) But it has drawback that it does not support SMTP over TLS under the hood.(Users of MailHog use proxy (e.g. stunnel) for eliminating this issue AFAIK)

Solution

We can create module for MailHog and encapsulate SSL logic inside this module. Users may decide whether they are want to use SSL or not through configuration. I’m planning to contribute this module what do you think about it?

Benefit

Users easily use this module for integration testing for SMTP mail sending

Alternatives

Users can use other docker images rather than MailHog or they may want to configure MailHog container themselves without using module

Would you like to help contributing this enhancement?

Yes

@Spelchure Spelchure added the enhancement New feature or request label Apr 10, 2024
@HofmeisterAn
Copy link
Collaborator

Hi 👋 did you try the existing Papercut (1, 2) module? I think both are very similar, although I do not know if they share/support the same features.

@Spelchure
Copy link
Author

Sorry my bad I didn't see Papercut module but it does not support SSL also if I am correct but I think adding extra SMTP server module while Papercut exists seems redundant. Thank you for your response

@HofmeisterAn
Copy link
Collaborator

A few days ago, I came across stalwartlabs/mail-server or Mailpit, another mail servers that supports various features, which could be alternatives. I think we can offer multiple modules for the same/similar services, as we do with databases. However, I would prefer to consolidate and prioritize support for established providers rather than incorporating all kinds of providers. For simpler modules, developers can always fall back to the generic builder API (MailHog seems quite established, though).

@feslima
Copy link

feslima commented Apr 29, 2024

@HofmeisterAn whether or not the repo of the SMTP server is active is important for the priorization process? It seems there is no active development for the mailhog repo (source).

@HofmeisterAn
Copy link
Collaborator

@HofmeisterAn whether or not the repo of the SMTP server is active is important for the priorization process? It seems there is no active development for the mailhog repo (source).

I think that is a good point. I am happy to continue with Mailpit (finalize and merge the PR). I simply wanted to share the PR for transparency, ensuring that developers are not working on similar modules, and making sure we choose an implementation that covers most use cases.

@feslima
Copy link

feslima commented Apr 29, 2024

No worries, thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants