Initial commit: Mail service with Brevo SMTP

- Express server with REST API for sending emails
- SQLite database for persistent email history
- Web interface with form (recipient, CC, subject, text/HTML)
- Email footer with embedded image (CID attachment)
- Nodemailer configured for Brevo SMTP relay

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-16 21:24:32 +00:00
parent b8f5847dca
commit c96aacbae5
12 changed files with 2161 additions and 0 deletions

257
public/style.css Normal file
View File

@@ -0,0 +1,257 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: #f5f5f5;
color: #333;
line-height: 1.6;
}
.container {
display: flex;
gap: 20px;
padding: 20px;
max-width: 1400px;
margin: 0 auto;
min-height: 100vh;
}
.panel {
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 24px;
}
.form-panel {
flex: 1;
max-width: 600px;
}
.history-panel {
flex: 1;
max-width: 500px;
}
h2 {
margin-bottom: 20px;
color: #2c3e50;
font-size: 1.5rem;
}
.form-group {
margin-bottom: 16px;
}
label {
display: block;
margin-bottom: 6px;
font-weight: 500;
color: #555;
}
input[type="text"],
input[type="email"],
textarea {
width: 100%;
padding: 10px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
transition: border-color 0.2s;
}
input:focus,
textarea:focus {
outline: none;
border-color: #3498db;
}
textarea {
resize: vertical;
min-height: 150px;
}
.radio-group {
display: flex;
gap: 20px;
}
.radio-group label {
display: flex;
align-items: center;
gap: 6px;
font-weight: normal;
cursor: pointer;
}
button {
background: #3498db;
color: white;
border: none;
padding: 12px 24px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: #2980b9;
}
button:disabled {
background: #bdc3c7;
cursor: not-allowed;
}
.btn-secondary {
background: #95a5a6;
padding: 8px 16px;
font-size: 14px;
}
.btn-secondary:hover {
background: #7f8c8d;
}
.status {
margin-top: 16px;
padding: 12px;
border-radius: 4px;
font-weight: 500;
}
.status.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.hidden {
display: none;
}
.history-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.history-header h2 {
margin-bottom: 0;
}
.history-list {
max-height: calc(100vh - 180px);
overflow-y: auto;
}
.history-item {
padding: 12px;
border: 1px solid #eee;
border-radius: 4px;
margin-bottom: 10px;
position: relative;
}
.history-item.success {
border-left: 4px solid #27ae60;
}
.history-item.failed {
border-left: 4px solid #e74c3c;
}
.history-item-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 8px;
}
.history-item-status {
font-weight: 600;
font-size: 13px;
}
.history-item.success .history-item-status {
color: #27ae60;
}
.history-item.failed .history-item-status {
color: #e74c3c;
}
.history-item-date {
font-size: 12px;
color: #888;
}
.history-item-to {
font-size: 14px;
color: #333;
margin-bottom: 4px;
}
.history-item-subject {
font-size: 13px;
color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.history-item-error {
font-size: 12px;
color: #e74c3c;
margin-top: 6px;
word-break: break-word;
}
.delete-btn {
background: none;
border: none;
color: #bbb;
cursor: pointer;
padding: 4px 8px;
font-size: 16px;
transition: color 0.2s;
}
.delete-btn:hover {
color: #e74c3c;
background: none;
}
.empty-message {
text-align: center;
color: #999;
padding: 40px 20px;
}
@media (max-width: 900px) {
.container {
flex-direction: column;
}
.form-panel,
.history-panel {
max-width: 100%;
}
.history-list {
max-height: 400px;
}
}