Remove email testing scripts and related files to streamline the project. This includes the deletion of various SMTP test scripts, contact form tests, and associated HTML files, which were previously used for testing email delivery and configuration.
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
import { testEmailConfiguration, sendAdminNotification } from '../utils/email-handler';
|
||||
import 'dotenv/config';
|
||||
|
||||
async function runEmailTest() {
|
||||
console.log('Starting email configuration test...');
|
||||
|
||||
// Test the SMTP connection
|
||||
const configTest = await testEmailConfiguration();
|
||||
console.log(`Configuration test result: ${configTest ? 'SUCCESS' : 'FAILED'}`);
|
||||
|
||||
if (configTest) {
|
||||
// Try sending a test email
|
||||
console.log('Attempting to send a test email...');
|
||||
const emailResult = await sendAdminNotification(
|
||||
'Test User',
|
||||
'test@example.com',
|
||||
'This is a test message sent at ' + new Date().toISOString(),
|
||||
'127.0.0.1',
|
||||
'Email Test Script'
|
||||
);
|
||||
|
||||
console.log(`Test email result: ${emailResult ? 'SENT' : 'FAILED'}`);
|
||||
}
|
||||
|
||||
console.log('Email test completed');
|
||||
}
|
||||
|
||||
runEmailTest().catch((error) => {
|
||||
console.error('Error running email test:', error);
|
||||
process.exit(1);
|
||||
});
|
Reference in New Issue
Block a user