clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
dharrigan 2021-01-13T05:57:18.042100Z

Dia dhaoibh!

slipset 2021-01-13T06:24:28.042400Z

Morning!

kardan 2021-01-13T06:25:00.042600Z

Good morning

djm 2021-01-13T06:58:09.042800Z

šŸ‘‹

plexus 2021-01-13T07:38:45.043Z

Morning!

ordnungswidrig 2021-01-13T08:07:18.043300Z

Guten Morgen!

javahippie 2021-01-13T08:13:27.043600Z

Morgen!

thomas 2021-01-13T08:50:13.043700Z

certainly feels like it

thomas 2021-01-13T08:50:34.044Z

moin moin

borkdude 2021-01-13T09:31:56.047200Z

Morning and welcome to @nic.youngster!

Nic 2021-01-13T09:41:02.047600Z

Thank you and good morning šŸ™‚

jasonbell 2021-01-13T09:41:21.047800Z

Morning

simongray 2021-01-13T09:43:39.048Z

morning

Matthias 2021-01-13T10:32:39.049700Z

Morning!

pez 2021-01-13T10:39:15.055100Z

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.

ā¤ļø 7
orestis 2021-01-13T11:20:28.056700Z

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 šŸ˜ž

orestis 2021-01-13T11:20:42.057100Z

Perhaps I should integrate Sendgrid and forget about SMTP at all?

slipset 2021-01-13T11:27:29.058Z

We use Amazon SES and smtp (via postal)

dharrigan 2021-01-13T11:37:51.058400Z

I uses SES with the Cognitect AWS libraries.

borkdude 2021-01-13T11:57:51.058800Z

@orestis fwiw we're using sendgrid + postal (clj lib)

orestis 2021-01-13T12:03:46.060Z

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.

2021-01-13T12:04:14.060800Z

morning

orestis 2021-01-13T12:04:57.062100Z

@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.

borkdude 2021-01-13T12:12:31.062300Z

Don't know, we just fire and forget ;)

borkdude 2021-01-13T12:12:54.062600Z

we do log errors, but it seems to be working all fine

borkdude 2021-01-13T12:13:28.062800Z

(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}))))

borkdude 2021-01-13T12:14:24.063400Z

afaik postal is a thin library around javax smtp. There is also another one by the vim-iced maintainer

borkdude 2021-01-13T12:14:46.063600Z

https://github.com/toyokumo/tarayo <- never tried it

2021-01-13T14:35:03.065400Z

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

borkdude 2021-01-13T14:37:27.065800Z

@otfrom that is why there is a doall + for here, I also collect the statuses

borkdude 2021-01-13T14:37:50.066400Z

if this was purely for side effects, this would have been a doseq or something

thomas 2021-01-13T15:16:17.066500Z

so what is the difference between doall and doseq?

borkdude 2021-01-13T15:19:47.067Z

doall realizes a (lazy) seq and returns it. doseq is just for side effects

šŸ‘ 1
2021-01-13T15:33:36.067400Z

yeah, doall remembering fail from me šŸ˜Š

2021-01-13T15:33:45.067600Z

šŸ˜³

orestis 2021-01-13T17:00:18.068300Z

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/

orestis 2021-01-13T17:03:19.068800Z

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/

orestis 2021-01-13T17:04:28.070400Z

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 šŸ™‚