MCPcopy Create free account
hub / github.com/pollinations/pollinations / sendSimpleEmail

Function sendSimpleEmail

apps/micro/examples/brevo-example.js:20–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19// Example 1: Send a simple email (similar to your original sendMail function)
20async function sendSimpleEmail() {
21 try {
22 console.log('📧 Sending simple email via Brevo...');
23
24 const result = await emailService.sendMail({
25 to: 'user@example.com',
26 subject: 'Hello from Brevo!',
27 html: '<h1>Hello World!</h1><p>This email was sent using your existing Brevo implementation.</p>',
28 });
29
30 if (result.success) {
31 console.log('✅ Email sent successfully!', result.messageId);
32 } else {
33 console.error('❌ Failed to send email:', result.error);
34 }
35 } catch (error) {
36 console.error('❌ Error:', error.message);
37 }
38}
39
40// Example 2: Send welcome email using template
41async function sendWelcomeEmail() {

Callers 1

runExamplesFunction · 0.70

Calls 3

logMethod · 0.80
errorMethod · 0.80
sendMailMethod · 0.65

Tested by

no test coverage detected