146 lines
11 KiB
Python
146 lines
11 KiB
Python
#!/usr/bin/env python3
|
|
"""Create the FCC Filing Deficiency Report campaign + send test."""
|
|
import json
|
|
import urllib.request
|
|
import base64
|
|
|
|
AUTH = base64.b64encode(b"api:6X1rKPea61N4rZ1S65Hx5zvqzbCj30F6nvEe9oVGH_Y").decode()
|
|
API = "http://localhost:9100/api"
|
|
|
|
BODY = r"""<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style>@media only screen and (max-width:600px){.pw-wrap{width:100%!important;border-radius:0!important;}.pw-pad{padding:24px 16px!important;}}body,table,td,p,a{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}table{border-collapse:collapse!important;}img{border:0;outline:none;text-decoration:none;}</style></head><body style="margin:0;padding:0;background:#eef0f3;">
|
|
<center>
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#eef0f3;"><tr><td style="padding:24px 10px;">
|
|
<table role="presentation" class="pw-wrap" width="620" cellpadding="0" cellspacing="0" style="margin:0 auto;border-radius:10px;overflow:hidden;background:#fff;">
|
|
|
|
<tr><td style="background:#1a2744;padding:24px 28px;">
|
|
<img src="https://performancewest.net/images/logo.png" alt="Performance West" style="height:44px;margin-bottom:10px;display:block" />
|
|
<h1 style="color:#fff;margin:0;font-size:20px;font-weight:700;font-family:Inter,system-ui,sans-serif;">FCC Filing Deficiency Report</h1>
|
|
<p style="color:#94a3b8;margin:6px 0 0;font-size:12px;font-family:Inter,sans-serif;">Prepared for {{ .Subscriber.Attribs.company }} — FRN {{ .Subscriber.Attribs.fcc_frn }}</p>
|
|
</td></tr>
|
|
|
|
<tr><td class="pw-pad" style="padding:28px;font-family:Inter,system-ui,sans-serif;color:#1f2937;">
|
|
|
|
<p style="font-size:15px;margin:0 0 18px;line-height:1.5;">Dear {{ .Subscriber.Name }},</p>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:0 0 18px;">As part of our ongoing compliance monitoring program, we downloaded and analyzed the certification documents on file with the FCC for <strong>{{ .Subscriber.Attribs.company }}</strong>. Our audit identified the following deficiencies in your current filings:</p>
|
|
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 22px;"><tr><td style="background:#fef2f2;border:2px solid #fca5a5;border-radius:10px;padding:18px;">
|
|
<h3 style="margin:0 0 8px;font-size:14px;color:#991b1b;font-weight:700;font-family:Inter,sans-serif;">Deficiencies Found:</h3>
|
|
<div style="font-size:13px;color:#7f1d1d;line-height:2;font-family:Inter,sans-serif;">
|
|
{{ Safe .Subscriber.Attribs.issues_html }}
|
|
</div>
|
|
<p style="font-size:11px;color:#9ca3af;margin:10px 0 0;font-style:italic;">Last audited: May 2026 — based on documents currently on file with the FCC</p>
|
|
</td></tr></table>
|
|
|
|
<h3 style="font-size:15px;font-weight:700;color:#1e3a5f;margin:24px 0 12px;font-family:Inter,sans-serif;">What This Means</h3>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:0 0 14px;">These are not minor technicalities. Your filed certification document is missing sections that the FCC now requires under its 2026 enforcement framework. Until corrected, your company is exposed to the following:</p>
|
|
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 22px;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;">
|
|
<tr style="background:#f8fafc;">
|
|
<td style="padding:10px 14px;font-size:12px;font-weight:700;color:#374151;border-bottom:1px solid #e5e7eb;font-family:Inter,sans-serif;">Filing</td>
|
|
<td style="padding:10px 14px;font-size:12px;font-weight:700;color:#374151;border-bottom:1px solid #e5e7eb;font-family:Inter,sans-serif;">Penalty for Non-Compliance</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10px 14px;font-size:12px;color:#374151;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;font-weight:600;">RMD Certification</td>
|
|
<td style="padding:10px 14px;font-size:12px;color:#7f1d1d;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;">Removal from the Robocall Mitigation Database, blocking call origination on the US phone network. Forfeitures up to <strong>$500,000</strong> per violation. <em>(FCC 22-37, 47 U.S.C. § 227(e))</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10px 14px;font-size:12px;color:#374151;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;font-weight:600;">CPNI Certification</td>
|
|
<td style="padding:10px 14px;font-size:12px;color:#7f1d1d;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;">Forfeitures up to <strong>$239,071</strong> per violation, <strong>$2,390,706</strong> for continuing violations. <em>(47 CFR § 64.2009(e), 47 CFR § 1.80)</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10px 14px;font-size:12px;color:#374151;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;font-weight:600;">Form 499-A</td>
|
|
<td style="padding:10px 14px;font-size:12px;color:#7f1d1d;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;">USAC Red Light status — blocks <strong>all FCC applications</strong>, license renewals, and equipment authorizations. <em>(47 CFR § 1.1910)</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10px 14px;font-size:12px;color:#374151;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;font-weight:600;">CALEA SSI Plan</td>
|
|
<td style="padding:10px 14px;font-size:12px;color:#7f1d1d;border-bottom:1px solid #f1f5f9;font-family:Inter,sans-serif;">Court-enforced penalties up to <strong>$10,000 per day</strong>. <em>(47 U.S.C. § 229)</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:10px 14px;font-size:12px;color:#374151;font-family:Inter,sans-serif;font-weight:600;">BDC Filing</td>
|
|
<td style="padding:10px 14px;font-size:12px;color:#7f1d1d;font-family:Inter,sans-serif;">FCC enforcement action for failure to report. <em>(47 CFR § 1.7001)</em></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3 style="font-size:15px;font-weight:700;color:#1e3a5f;margin:24px 0 12px;font-family:Inter,sans-serif;">Verify It Yourself</h3>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:0 0 18px;">We encourage you to independently verify these findings. Our compliance checker queries FCC databases in real time and analyzes your filed documents against current 2026 requirements:</p>
|
|
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 22px;"><tr><td style="background:#fff7ed;border:2px solid #f97316;border-radius:10px;padding:18px;text-align:center;">
|
|
<a href="https://performancewest.net/tools/fcc-compliance-check?frn={{ .Subscriber.Attribs.fcc_frn }}" style="display:inline-block;padding:14px 40px;background:#f97316;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:15px;font-family:Inter,sans-serif;">Run Free Compliance Check →</a>
|
|
<p style="font-size:11px;color:#9a3412;margin:10px 0 0;font-family:Inter,sans-serif;">No account required. Results in 30–90 seconds.</p>
|
|
</td></tr></table>
|
|
|
|
<h3 style="font-size:15px;font-weight:700;color:#1e3a5f;margin:24px 0 12px;font-family:Inter,sans-serif;">How We Can Help</h3>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:0 0 14px;">If you'd like professional assistance correcting these filings, Performance West specializes in FCC regulatory compliance for telecom carriers:</p>
|
|
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 22px;"><tr><td style="background:#f0f4f8;border-radius:10px;padding:18px;">
|
|
<ol style="font-size:13px;color:#374151;margin:0;padding:0 0 0 18px;line-height:2.2;font-family:Inter,sans-serif;">
|
|
<li>Review your current filings and identify every deficiency</li>
|
|
<li>Prepare corrected certification documents that meet 2026 standards</li>
|
|
<li>Send them to you for electronic signature</li>
|
|
<li>File directly with the FCC on your behalf</li>
|
|
<li>Provide confirmation numbers and filed copies for your records</li>
|
|
</ol>
|
|
<p style="font-size:12px;color:#64748b;margin:12px 0 0;font-family:Inter,sans-serif;">Typical turnaround: 3–7 business days. We handle everything — you just sign.</p>
|
|
</td></tr></table>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:0 0 18px;">There is no obligation. If you'd like to discuss your specific situation, we're happy to walk you through what needs to be corrected.</p>
|
|
|
|
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 22px;"><tr><td style="background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:16px;text-align:center;">
|
|
<p style="font-size:14px;color:#1e3a5f;margin:0 0 4px;font-weight:600;font-family:Inter,sans-serif;">Ready to get started? Have questions?</p>
|
|
<p style="font-size:20px;color:#1e3a5f;margin:8px 0;font-weight:800;font-family:Inter,sans-serif;letter-spacing:1px;">(888) 411-0383</p>
|
|
<p style="font-size:12px;color:#475569;margin:0;font-family:Inter,sans-serif;">Or reply directly to this email — it comes straight to our team.</p>
|
|
</td></tr></table>
|
|
|
|
<p style="font-size:14px;line-height:1.7;margin:18px 0 0;">Respectfully,</p>
|
|
<p style="font-size:14px;line-height:1.5;margin:4px 0 0;"><strong>Justin Hannah</strong><br>Performance West Inc.<br><span style="font-size:12px;color:#64748b;">FCC Compliance Services</span></p>
|
|
|
|
</td></tr>
|
|
|
|
<tr><td style="padding:16px 28px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:11px;color:#9ca3af;text-align:center;font-family:Inter,sans-serif;">
|
|
<p style="margin:0;">Performance West Inc. · 525 Randall Ave Ste 100-1195, Cheyenne, WY 82001 · <a href="https://performancewest.net" style="color:#6b7280;">performancewest.net</a></p>
|
|
<p style="margin:6px 0 0;"><a href="{{ UnsubscribeURL }}" style="color:#6b7280;">Unsubscribe</a></p>
|
|
</td></tr>
|
|
|
|
</table>
|
|
</td></tr></table>
|
|
</center>
|
|
</body></html>"""
|
|
|
|
# Create main campaign on List 9
|
|
data = {
|
|
"name": "FCC Filing Deficiency Report \u2014 May 2026",
|
|
"subject": "FCC Filing Deficiency Report \u2014 {{ .Subscriber.Attribs.company }}",
|
|
"from_email": "Performance West <noreply@performancewest.net>",
|
|
"content_type": "html",
|
|
"body": BODY,
|
|
"lists": [9],
|
|
"template_id": 1,
|
|
"headers": [{"Reply-To": "info@performancewest.net"}],
|
|
"tags": ["deficiency-report", "penalties", "may-2026"],
|
|
}
|
|
|
|
req = urllib.request.Request(API + "/campaigns", data=json.dumps(data).encode(), method="POST",
|
|
headers={"Content-Type": "application/json", "Authorization": "Basic " + AUTH})
|
|
resp = json.loads(urllib.request.urlopen(req).read())
|
|
cid = resp.get("data", {}).get("id")
|
|
print(f"Campaign {cid} created (draft) on List 9")
|
|
|
|
# Create + send test on List 7
|
|
data2 = dict(data)
|
|
data2["name"] = "TEST \u2014 Deficiency Report preview"
|
|
data2["lists"] = [7]
|
|
data2["tags"] = ["test"]
|
|
req2 = urllib.request.Request(API + "/campaigns", data=json.dumps(data2).encode(), method="POST",
|
|
headers={"Content-Type": "application/json", "Authorization": "Basic " + AUTH})
|
|
resp2 = json.loads(urllib.request.urlopen(req2).read())
|
|
tcid = resp2.get("data", {}).get("id")
|
|
|
|
req3 = urllib.request.Request(API + f"/campaigns/{tcid}/status",
|
|
data=json.dumps({"status": "running"}).encode(), method="PUT",
|
|
headers={"Content-Type": "application/json", "Authorization": "Basic " + AUTH})
|
|
urllib.request.urlopen(req3)
|
|
print(f"Test campaign {tcid} sent to test list")
|