mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-12 14:07:28 +00:00
- Backend now uses From address as recipient when To array is empty - Fixed sendEmail and sendGroupedEmail to not check for recipients - Added detailed logging for SMTP operations - Fixed recipient logging to show actual recipients sent This allows users to send test emails to themselves without having to enter their email address in the recipients field, as promised by the UI.
23 lines
822 B
JavaScript
23 lines
822 B
JavaScript
const fs = require('fs');
|
|
const crypto = require('crypto');
|
|
const path = require('path');
|
|
|
|
// This is a test to see if password is in the encrypted file
|
|
// We can't actually decrypt without the key, but we can check file size
|
|
|
|
const encFile = '/etc/pulse/email.enc';
|
|
const stats = fs.statSync(encFile);
|
|
|
|
console.log('Encrypted email file info:');
|
|
console.log(' Size:', stats.size, 'bytes');
|
|
console.log(' Modified:', stats.mtime);
|
|
|
|
// A config with password should be larger than one without
|
|
// Typical empty config ~200 bytes, with password ~250+ bytes
|
|
if (stats.size < 200) {
|
|
console.log(' ⚠️ File seems too small to contain full config');
|
|
} else if (stats.size > 250) {
|
|
console.log(' ✅ File size suggests it may contain password');
|
|
} else {
|
|
console.log(' 🤔 File size is in between - uncertain');
|
|
}
|