Files
eleith 1544f0300f style: normalize formatting before adopting Oxfmt
Apply the existing tabs, quotes, semicolon, and line-width conventions across source, tests, examples, documentation, and configuration. Include Oxfmt's parentheses around a conditional type without changing behavior.
2026-10-26 14:49:11 -07:00

26 lines
670 B
JavaScript

import { Message } from '../dist/index.js'
import { getMailpitClient } from './mailpit-client.js'
async function sendTextEmail() {
const client = getMailpitClient()
const message = new Message({
from: 'sender@example.com',
to: 'recipient@example.com',
subject: 'Test Text Email to Mailpit',
text: 'This is a test text email sent from the emailjs library script to Mailpit.',
})
try {
console.log('Attempting to send text email...')
await client.sendAsync(message)
console.log('Text email sent successfully to Mailpit!')
} catch (error) {
console.error('Failed to send text email:', error)
} finally {
client.smtp.close()
}
}
sendTextEmail()