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

sending mail: include lib or make pod #599

Closed
borkdude opened this issue Sep 29, 2020 · 3 comments
Closed

sending mail: include lib or make pod #599

borkdude opened this issue Sep 29, 2020 · 3 comments

Comments

@borkdude
Copy link
Collaborator

borkdude commented Sep 29, 2020

Since an email is just plain data, it's a perfect candidate for a pod.
E.g. drewr/postal could be compiled with GraalVM java 8 and then be used from babashka.
Note that we have tried to use drewr/postal before, but this failed due to Java 11 restrictions:
#366
Worked around that (drewr/postal#107), now running into:

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=utf-8

$ rlwrap ./bb
Babashka v0.2.2-SNAPSHOT REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> (require '[postal.core :as p])
nil
user=> (p/send-message {} {:from "michielborkent@gmail.com" :to "michielborkent@gmail.com" :body "hello"})
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=utf-8 [at <repl>:2:1]

Seems to be the same issue as in: quarkusio/quarkus#1840
Work in progress in branch https://github.com/borkdude/babashka/tree/postal2.

Maybe this Quarkus extension could be wrapped in some Clojure code:
https://github.com/quarkusio/quarkus/tree/master/extensions/mailer
But that wouldn't be the same as postal

More info: https://github.com/babashka/babashka.pods
https://github.com/borkdude/babashka/blob/master/doc/libraries.md#pods

Another lib in this space: https://github.com/toyokumo/tarayo

@borkdude borkdude changed the title mailer pod sending mail: include lib or make pod Sep 29, 2020
@borkdude
Copy link
Collaborator Author

borkdude commented Oct 1, 2020

There's now a pod available: https://github.com/tzzh/pod-tzzh-mail

@borkdude borkdude closed this as completed Oct 1, 2020
@borkdude
Copy link
Collaborator Author

borkdude commented Oct 1, 2020

If anyone knows how to make postal to work with GraalVM, I'm willing to take another look.

@drewr
Copy link

drewr commented Jan 12, 2022

Thank you for writing this up @borkdude!

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