hamiltlr / discord-smtp-relay

A simple relay from SMTP to Discord webhook
1 stars 1 forks source link

Anyone interested in attachments? #8

Open psyciknz opened 1 year ago

psyciknz commented 1 year ago

Wondering, how hard it would be to add those.....I've not looked into the aiosmtpd.smtp library much, but I think I would be mucking around in the handle_message method, as far as I can tell that's where it deals with teh incoming message and them posts to discord.

So I'd need some sort of way of figuring out if the body is multipart and contains an image...and if so change the call to discord to include an image.

psyciknz commented 1 year ago

So I've been working on this, unsure if you'd like me to issue a PR. BUt I've done a few things. Made a docker file and automatic public on dockerhub. Added ability to publish to multiple discord channels by way of a discord bot over webhooks. https://github.com/psyciknz/discord-smtp-relay

hamiltlr commented 1 year ago

This is a neat idea, feel free to open a PR!

psyciknz commented 1 year ago

I can do this. Not sure what will happen with all the GitHub actions etc for building the containers - I know I had to set up some gothic secrets with dockerhub credentials etc.

But we can cross that bride later.

I'll do a PR on it.