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

[suggestion] make encoder/decoder configurable to avoid conflicts with eiconv #334

Open
fcevado opened this issue Feb 6, 2024 · 3 comments

Comments

@fcevado
Copy link

fcevado commented Feb 6, 2024

When using a different encoding/decoding library than eiconv i need to make a fake module that implements the convert/3. if a dependency uses eiconv, it might lead co conflicts.

my suggestion is to have it being configurable, so gen_smtp uses the configured module, otherwise keep using eiconv.
for the sake of documenting it would be good to have a behaviour defining a contract for convert/3.

@Vagabond
Copy link
Collaborator

Vagabond commented Feb 6, 2024

That should be relatively easy to do. You could just add a new option key to mimemail's options tuple and thread it through to where it calls mimemail:convert/3

@fcevado
Copy link
Author

fcevado commented Feb 6, 2024

yep, i'm planning to work on this this weekend, just asking if the approach is approved. should i include the behavior? probably mimemail_encoder or something like that

@Vagabond
Copy link
Collaborator

Vagabond commented Feb 6, 2024

I am not super concerned about the behaviour, if someone configures a module that doesn't work it can just crash, or you can use module:is_exported. Using a behaviour would introduce an annoying dependency, I think?

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

No branches or pull requests

2 participants