#!/usr/bin/env python3
import smtplib, ssl, os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
USER, APP = [x.strip() for x in open(os.path.expanduser("~/.aura_csi_smtp")).read().split("\n")[:2]]
TO = "bob.carella@auravision.co"; CC = "plchou@gmail.com"
DESK = "0x4FFDB5b7b14Ef24f19095B278D709CEd99257aF2"

plain = f"""Bob,

Time-sensitive. The Compute Recycling pilot is live — and it's converting. Four community
members recycled $LEDGER into USDC in the first few hours, every one paid out automatically
in about a minute. It works, end to end.

It's drained its starter float, so I've had to pause it. To reopen and keep it running, it
needs a USDC float.

The ask: send $2,000 USDC to the recycle float:
  {DESK}   (Ethereum mainnet)

That covers dozens of recycles and lets the pilot run overnight instead of emptying in an
hour. The moment it lands, the pilot reopens automatically.

Why it's in your lane directly: recycling is how we acquire $LEDGER below market with zero
slippage — the cheaper way to get the inventory you keep saying we need. Every dollar of this
float comes back to us as $LEDGER we hold.

Flag me when it's out.

Aura (CSI)
"""
html = f"""<div style="font-family:'Chakra Petch',-apple-system,Segoe UI,sans-serif;font-size:15px;color:#1a1510;line-height:1.6">
<p>Bob,</p>
<p><b>Time-sensitive.</b> The Compute Recycling pilot is live — and it's converting. <b>Four community
members</b> recycled $LEDGER into USDC in the first few hours, every one paid out automatically in about
a minute. It works, end to end.</p>
<p>It's drained its starter float, so I've had to pause it. To reopen and keep it running, it needs a USDC float.</p>
<p style="background:#faf4e8;border-left:3px solid #e8a84a;padding:10px 14px"><b>The ask:</b> send <b>$2,000 USDC</b> to the recycle float<br>
<code>{DESK}</code> &nbsp;(Ethereum mainnet).<br>That covers dozens of recycles and runs the pilot overnight instead of emptying in an hour. It reopens the moment the float lands.</p>
<p>Why it's in your lane: recycling is how we acquire $LEDGER <b>below market, zero slippage</b> — the cheaper way to get the inventory you keep saying we need. Every dollar of this float comes back to us as $LEDGER we hold.</p>
<p>Flag me when it's out.</p>
<p style="margin-top:16px">Aura <span style="color:#8a7a5c">(CSI)</span></p>
</div>"""
m = MIMEMultipart("alternative")
m["Subject"] = "Recycle pilot is live & converting — needs a USDC float to reopen"
m["From"] = f"Aura (CSI) <{USER}>"; m["To"] = TO; m["Cc"] = CC
m.attach(MIMEText(plain, "plain")); m.attach(MIMEText(html, "html"))
s = smtplib.SMTP("smtp.gmail.com", 587, timeout=60)
s.ehlo(); s.starttls(context=ssl.create_default_context()); s.ehlo(); s.login(USER, APP)
s.sendmail(USER, [TO, CC], m.as_string()); s.quit()
print(f"SENT -> {TO}, cc {CC}")
