| 37 | } |
| 38 | |
| 39 | async function sendCustomEmail() { |
| 40 | try { |
| 41 | console.log('Sending custom email...'); |
| 42 | |
| 43 | const result = await emailService.sendMail({ |
| 44 | to: 'user@example.com', |
| 45 | subject: 'Hello from Micro Service!', |
| 46 | text: 'This is a test email from the micro service.', |
| 47 | html: '<h1>Hello from Micro Service!</h1><p>This is a test email from the micro service.</p>', |
| 48 | }); |
| 49 | |
| 50 | if (result.success) { |
| 51 | console.log('✅ Custom email sent successfully!', result.messageId); |
| 52 | } else { |
| 53 | console.error('❌ Failed to send custom email:', result.error); |
| 54 | } |
| 55 | } catch (error) { |
| 56 | console.error('❌ Error:', error.message); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | async function verifyConnection() { |
| 61 | try { |