Repository navigation
Expand file tree
/
Copy pathsend_final_report.js
More file actions
74 lines (67 loc) · 3.18 KB
/
Copy pathsend_final_report.js
File metadata and controls
74 lines (67 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const nodemailer = require('nodemailer');
async function sendFinalEmail() {
console.log("Attempting final email delivery via Port 465...");
const transporter = nodemailer.createTransport({
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
user: "taruner420@gmail.com",
pass: "gujm srls cwam jbza",
}
});
const reportHtml = `
<!DOCTYPE html>
<html>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<div style="max-width: 600px; margin: auto; border: 1px solid #ddd; border-radius: 8px; overflow: hidden;">
<div style="background: #111827; color: #fff; padding: 20px; text-align: center;">
<h1 style="margin: 0;">📊 Manager Agent Audit</h1>
<p style="margin: 5px 0 0;">Batch Summary: Last 50 Calls</p>
</div>
<div style="padding: 20px;">
<h2>Executive Summary</h2>
<table style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
<tr>
<td style="padding: 10px; border: 1px solid #eee;"><b>Total Audited</b></td>
<td style="padding: 10px; border: 1px solid #eee;">50</td>
</tr>
<tr>
<td style="padding: 10px; border: 1px solid #eee;"><b>Avg Score</b></td>
<td style="padding: 10px; border: 1px solid #eee;">84/100</td>
</tr>
<tr>
<td style="padding: 10px; border: 1px solid #eee; color: #dc2626;"><b>Critical Failures</b></td>
<td style="padding: 10px; border: 1px solid #eee; color: #dc2626;">3</td>
</tr>
</table>
<h3 style="color: #111827;">🚨 Top Issue: Call 019c3100</h3>
<p><b>Agent:</b> Sarah (Caudle Village)<br>
<b>Issue:</b> Technical Transfer Failure<br>
<b>Evidence:</b> Agent promised connection but tool was never triggered.</p>
<div style="background: #f3f4f6; padding: 15px; border-radius: 4px; font-family: monospace;">
FIX: TRANSFER RULE (STRICT): After saying "Let me connect you," you MUST call transferCall immediately.
</div>
<hr style="margin: 20px 0; border: 0; border-top: 1px solid #eee;">
<p style="font-size: 12px; color: #666; text-align: center;">
Generated by Vox OpenClaw Manager Agent POC • ${new Date().toLocaleString()}
</p>
</div>
</div>
</body>
</html>
`;
const mailOptions = {
from: '"Vox Manager Agent" <taruner420@gmail.com>',
to: "taruner420@gmail.com",
subject: "📊 Manager Agent POC: Batch Audit Report (50 Calls)",
html: reportHtml
};
try {
let info = await transporter.sendMail(mailOptions);
console.log("SUCCESS: Report sent to taruner420@gmail.com. MessageId: " + info.messageId);
} catch (error) {
console.error("CRITICAL EMAIL FAILURE: " + error.message);
}
}
sendFinalEmail();