-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-email.js
More file actions
26 lines (21 loc) Β· 817 Bytes
/
Copy pathtest-email.js
File metadata and controls
26 lines (21 loc) Β· 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Test script to send welcome email
// Run with: node test-email.js
import EmailService from './src/utils/emailService.js';
async function testWelcomeEmail() {
console.log('π§ͺ Testing welcome email to pankajhadole4@gmail.com...');
try {
const result = await EmailService.sendWelcomeEmail('pankajhadole4@gmail.com');
if (result) {
console.log('β
Welcome email sent successfully!');
console.log('π§ Check your inbox (and spam folder) for the email');
console.log('π§ From: phcoder.blog@gmail.com');
console.log('π§ Subject: π Welcome to PHcoder Newsletter!');
} else {
console.log('β Failed to send welcome email');
}
} catch (error) {
console.error('β Error sending welcome email:', error);
}
}
// Run the test
testWelcomeEmail();