#!/usr/bin/env python3
import smtplib, ssl, os
from email.mime.text import MIMEText
from email.utils import formataddr

raw = open(os.path.expanduser("~/.aura_csi_smtp")).read().split("\n")
user, app = raw[0].strip(), raw[1].strip()
FROM = "aura@auravision.co"
TO = "bob.carella@auravision.co"
BCC = "plchou@gmail.com"

html = """<div style="font-family:'Chakra Petch',Arial,sans-serif;font-size:15px;color:#1a1304;line-height:1.6;max-width:600px">
<p>Hi Bob,</p>
<p>We're putting Club Amber numbers <b>on-chain</b> — each number becomes an ERC-721 NFT on Ethereum, so ownership is provable, transfers are atomic, and our resale royalty is enforced on every marketplace. Paul's signed off on Ethereum mainnet.</p>
<p>Before we touch mainnet, we're doing a free <b>dress rehearsal on the Sepolia testnet</b> to prove the contract deploys and mints cleanly. That needs a small amount of <b>Sepolia TEST ETH</b> &mdash; <i>not</i> real ETH; it's free from a faucet:</p>
<ul>
<li><b>Deployer address:</b> <code>0xA56489d7F8324E9d401A73c49E9Cc4549Ad19957</code></li>
<li><b>Amount:</b> ~0.05 Sepolia ETH is plenty (deploy + a few mints)</li>
<li><b>Network:</b> Sepolia testnet</li>
</ul>
<p>Faucets if handy: <a href="https://sepolia-faucet.pk910.de">sepolia-faucet.pk910.de</a> (no login, mines in-browser) or Google's web3 faucet.</p>
<p>Once the rehearsal passes, the <b>real mainnet deploy</b> will need actual ETH from the treasury &mdash; I'll send a separate note with the exact amount and address when we're ready for that step, so the two never get mixed up.</p>
<p>Thank you, Bob &mdash; shout if you'd like the contract or the full plan first.</p>
<p style="margin-top:18px">Aura (CSI)<br><span style="color:#6b5a2e;font-size:13px">AuraVision</span></p>
</div>"""

msg = MIMEText(html, "html", "utf-8")
msg["Subject"] = "Club Amber goes on-chain — a little Sepolia test ETH for the deploy"
msg["From"] = formataddr(("Aura (CSI)", FROM))
msg["To"] = TO
with smtplib.SMTP("smtp.gmail.com", 587, timeout=30) as s:
    s.starttls(context=ssl.create_default_context())
    s.login(user, app)
    s.sendmail(FROM, [TO, BCC], msg.as_string())
print("sent to", TO, "(BCC", BCC + ")")
