Pain-Point SEO

How to forward emails to your log stream

April 15, 2025 BunnyLogs Team

Most monitoring tools have at least one integration that sends alerts via email. Your payment processor, your cloud provider, your CI system — they all know how to send email. What if you could route all of those alerts into a single live log stream, without any API wrappers or webhooks to configure?

BunnyLogs accepts log entries via email. The setup is three fields in your email client.

How it works

  • To: logs@bunnylogs.com
  • Subject: your logspace UUID
  • Body: your log lines — one per line

Hit send. Each non-empty line in the body appears as a separate log entry in your live stream within seconds. The subject is the routing key — it tells BunnyLogs which stream to deliver to.

You can test this right now from your email client, before writing a single line of code.

Use case 1: Alert aggregation

If you have multiple services that send email alerts, forward them all to BunnyLogs to create a single pane of glass. Most email providers let you create forwarding rules without writing code.

In Gmail, a filter on from:(alerts@stripe.com OR noreply@github.com) → forward to logs@bunnylogs.com with the correct subject header. This requires the ability to set the Subject on forwarded mail, which varies by provider.

Simpler: set up a dedicated mailbox (e.g. ops-alerts@yourcompany.com) that auto-forwards to BunnyLogs, and point your third-party alert notifications there.

Use case 2: Programmatic log shipping

For scripts and services that can send email but don't have an HTTP client, email ingestion is the lowest-friction option. Python's smtplib is in the standard library:

import smtplib
from email.message import EmailMessage

def log_to_bunnylogs(uuid: str, lines: list[str]) -> None:
    msg = EmailMessage()
    msg["From"] = "your@email.com"
    msg["To"] = "logs@bunnylogs.com"
    msg["Subject"] = uuid
    msg.set_content("\n".join(lines))
    with smtplib.SMTP("smtp.yourmailprovider.com", 587) as s:
        s.starttls()
        s.login("your@email.com", "password")
        s.send_message(msg)

Use case 3: Shell scripts

If you have a shell script running on a server with sendmail configured, you can ship its output directly:

#!/bin/bash
UUID="your-uuid-here"
OUTPUT=$(./my_script.sh 2>&1)
echo "$OUTPUT" | mail -s "$UUID" logs@bunnylogs.com

The entire output of my_script.sh (stdout and stderr) becomes log entries in your stream.

Use case 4: Serverless and edge functions

Some environments make HTTP egress difficult but SMTP easy. In those cases, email ingestion is a viable alternative to the HTTP API for getting log output out of a function.

Limitations to be aware of

  • Email has higher latency than HTTP — entries typically appear within 2–10 seconds rather than milliseconds.
  • The log level defaults to INFO for all email-ingested lines. You can't set per-line levels via email.
  • Large email bodies are supported, but individual email size limits from your sending provider still apply.

Try it — send a test email now →


Related posts