Send attachment via email

I want to send a .csv attachment via email. I know SMTP integration cannot send files other than images. So is there a way to send an attachment via email, including using pyscript. Can anyone help? I’m totally lost.

A little off topic, but did you ever manage to get an image sent through SMTP integration, I’m stuggling.