Dia dhaoibh!
Morning!
Good morning
š
Morning!
Guten Morgen!
Morgen!
certainly feels like it
moin moin
Morning and welcome to @nic.youngster!
Thank you and good morning š
Morning
morning
Morning!
Good morning! Today I am enjoying my time onboarding a new colleague. He is super skilled at a level where usually they are a bit less skilled socially, but this guy is just wonderfully empathic and a pleasant. And fun. Makes me laugh all the time. Amazing combo. Also find myself a bit in a conflict, because at the same time I wish the workday will end so that I can get back to converting bash/awk scripts to babashka in a non-profit project I am involved in. It is lovely to be able to work in a civilised language with important stuff, and also wonderful to see how things are quickly moving from maintenance hell to a situation where I can look at the requirements list and keep smiling.
Good morning! Today I fell into a rabbit hole of implementing SMTP email support for a stubborn client who doesnāt accept our Mailgun provider. They want to use sendgrid instead š
Perhaps I should integrate Sendgrid and forget about SMTP at all?
We use Amazon SES and smtp (via postal)
I uses SES with the Cognitect AWS libraries.
@orestis fwiw we're using sendgrid + postal (clj lib)
Oh weāre subject to DPAs so we canāt just switch providers. We use mailgun as our main provider via their API but, enterprise clients.
morning
@borkdude does postal handle things like retrying etc? SMTP is a complex thing. Using an http api to mailgun I donāt have to worry about those things. Perhaps though sendgrids SMTP endpoint is just a thin layer on top of their api.
Don't know, we just fire and forget ;)
we do log errors, but it seems to be working all fine
(doall
(for [m mails]
(try
{:success
(apply smtp/smtp-send
{:host host
:user user
:pass pass
:ssl true}
[m])}
(catch Exception e
(error e "exception when sending mail" m)
{:error e}))))
afaik postal is a thin library around javax smtp. There is also another one by the vim-iced maintainer
https://github.com/toyokumo/tarayo <- never tried it
that's interesting. For a lot of side effecting things where there is a status that is returned I like to do a into/map so that I can get the status msg for each thing I wanted to send
@otfrom that is why there is a doall + for here, I also collect the statuses
if this was purely for side effects, this would have been a doseq or something
so what is the difference between doall
and doseq
?
doall
realizes a (lazy) seq and returns it. doseq
is just for side effects
yeah, doall remembering fail from me š
š³
So in our Node.js app that weāre moving away from, weāre using a library called nodemailer: observe and marvel at thisā¦ https://nodemailer.com/about/
BTW I was talking about various 4xx SMTP codes that mean you should probably retry later: https://sendgrid.com/blog/smtp-server-response-codes-explained/
I know by looking at our mailgun logs, when clients do bursts of emails, like messaging 10000 users at once, the remote servers will say āback off, misterā and then mailgun throttles down and retries with smaller batches etc etc until weāre off the tarpitā¦ which is something I donāt want to do manually š