i'm looking into sending email notifications from ...
# server
d
i'm looking into sending email notifications from my backend (ktor, exposed), does someone have experience with this and can suggest me a library? i found a couple on github so far but not sure which way to go.
n
are you using an application server? the spring framework? a bit more context would be helpful 🙂
d
i'm using ktor for my server app, so no spring. it's running as standalone with netty; so far it's pretty basic, except for quartz for job scheduling there are not many dependencies, and im not sure what kind of context would be helpful otherwise
i don't think i'd want to set-up a mail server (sounds like overkill for my notification use-case) but instead connect to an existing SMTP server and send mails through that
n
there’s Apache Commons Email https://commons.apache.org/proper/commons-email/ though i never used it
d
thanks, i'll take a look at it. what would be your go-to solution for email sending?
or rather what did you use so far?
n
in general, i use an application server last time (it was a while ago) i used the resource configured in the app server and simple JavaMail nowadays, i could probably push to use spring as it simplifies its usage
t
@damian i wrote a tutorial for using commons with gmail: https://javalin.io/tutorials/email-sending-example-kotlin
👍 2
it's for javalin, but the actual code for email sending is completely standalone, so it'll work fine with ktor
v
@tipsy still working? i have a ktor server and when i tried to send mails, i got a connection timeout. I tried both with different accounts as with different smtp servers, but the result is the same.
t
If your using the approach from my tutorial the timeout shouldn't be related to ktor
v
@tipsy Yeah, i'm agree with you. I was under a reverse proxy. Works great!