Skip to content

Instantly share code, notes, and snippets.

View lachlan2k's full-sized avatar
👨‍💻

Lachlan Davidson lachlan2k

👨‍💻
View GitHub Profile
@lachlan2k
lachlan2k / ilo-smtp-webhook-bridge.py
Created November 7, 2021 01:27
Relay iLO4 AlertMail to a Discord Webhook with a simple SMTP server
import email
import asyncio
import requests
import quopri
from aiosmtpd.controller import Controller
from email.policy import default as default_policy
# Closest thing to auth it supports, just use a random long string as the recipient
KEY = '<snip>@foobar.com'
WEBHOOK_URL = 'https://discord.com/api/webhooks/<snip>'