// Set a new email (reset inbox) function setNewEmail() { const newEmailAddr = generateNewEmail(); currentEmail = newEmailAddr; selectedMessageId = null; // Ensure we have storage for this email (maybe empty initially) if (!loadMessagesForEmail(currentEmail).length) { saveMessagesForEmail(currentEmail, []); } document.getElementById('emailAddress').innerText = currentEmail; refreshInboxUI(); // Restart auto email generation for new address if (intervalId) clearInterval(intervalId); startAutoGenerateEmails();
/* Footer */ .footer { background: #edf2f7; padding: 15px; text-align: center; font-size: 0.8rem; color: #4a5568; border-top: 1px solid #e2e8f0; }
#emailAddress { flex: 1; font-family: monospace; font-size: 1rem; color: #2d3748; word-break: break-all; } temp mail script
@media (max-width: 768px) { .main-content { flex-direction: column; } .inbox-sidebar, .email-detail { width: 100%; } .message-list { max-height: 300px; } .email-bar { flex-direction: column; align-items: stretch; } } </style> </head> <body>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>TempMail - Disposable Temporary Email Service</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; } // Set a new email (reset inbox) function
.message-sender { font-weight: 600; color: #2d3748; margin-bottom: 5px; }
// Manual refresh function manualRefresh() { if (currentEmail) { refreshInboxUI(); const refreshBtn = document.getElementById('refreshInboxBtn'); const original = refreshBtn.innerText; refreshBtn.innerText = '✓ Refreshed!'; setTimeout(() => { refreshBtn.innerText = original; }, 800); } } currentEmail = newEmailAddr
.email-display span { color: #4a5568; font-weight: 500; }