A SMTP server that forwards sent emails as .eml attachments in Discord DMs.
- Build with .NET 9
- Provide Discord bot token as DISCORD_TOKEN environment variable
- Run and send email via
localhost:9025todiscord-id@discord.comwhere discord-id is a Discord User ID (use Developer Mode in the Discord client to find this out)
Drag the attachment into your email client usually works.
Mastodon instance, atproto PDS, etc. if you don't wanna set up a mailpit or a real email service (and deal with all the problems that creates)
If you get a 403 Forbidden error when forwarding emails you probably need to share a server with the bot in order to receive DMs from it.
Don't expose the SMTP server publicly! It has no authentication and can easily be used for spam. If you need something more robust feel free to fork the code and add authentication.