Mailloop service health and performance
This check tests the core SMTP delivery pipeline. It sends an email through our SMTP server to a sandbox inbox and verifies the email is received within 30 seconds. This validates that email sending, processing, and storage are working correctly.
// Send email via SMTP to sandbox
const transporter = nodemailer.createTransport({
host: smtpHost,
port: smtpPort,
auth: { user: sandbox.username, pass: sandbox.password },
});
await transporter.sendMail({
from: 'monitoring@mailloop.test',
to: sandbox.emailAddress,
subject: `[MONITORING-${runId}] Fake Sandbox Test`,
text: `Monitoring check email for run ${runId}`,
});
// Wait for email using SDK
const email = await client.emails.waitFor(sandboxId, {
subject: subject,
timeout: 30000,
}); This check tests the complete SDK temporary sandbox workflow. It creates a new temporary sandbox via the API, sends an email to it via SMTP, waits for delivery using the SDK waitFor method, and then cleans up. This validates the full sandbox lifecycle.
// Create temporary sandbox via SDK
const tempSandbox = await client.sandboxes.createTemporary({
name: `Monitoring Test ${runId.slice(0, 8)}`,
duration: 60, // 60 seconds lifetime
});
// Send email via SMTP
const transporter = nodemailer.createTransport({
host: smtpHost,
port: smtpPort,
auth: { user: tempSandbox.username, pass: password },
});
await transporter.sendMail({
from: 'monitoring@mailloop.test',
to: tempSandbox.emailAddress,
subject: `[MONITORING-${runId}] Temporary Sandbox Test`,
});
// Wait for email using SDK
const email = await client.emails.waitFor(tempSandbox.id, {
subject: subject,
timeout: 30000,
});
// Cleanup
await client.sandboxes.delete(tempSandbox.id); This check tests email reception from external SMTP servers. It sends an email from a real external SMTP provider to a sandbox redirect address and verifies delivery within 5 minutes. This validates that external email forwarding is working.
// Send via real external SMTP provider
const transporter = nodemailer.createTransport({
host: process.env.MONITORING_REAL_SMTP_HOST,
port: parseInt(process.env.MONITORING_REAL_SMTP_PORT),
auth: {
user: process.env.MONITORING_REAL_SMTP_USER,
pass: process.env.MONITORING_REAL_SMTP_PASS,
},
});
await transporter.sendMail({
from: smtpUser,
to: inboxEmail, // Sandbox redirect address
subject: `[MONITORING-${runId}] Real SMTP Test`,
});
// Wait for email (longer timeout for external delivery)
const email = await client.emails.waitFor(sandboxId, {
subject: subject,
timeout: 300000, // 5 minutes
});