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

Function sendBulkEmail

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

Source from the content-addressed store, hash-verified

83
84// Example 4: Send to multiple recipients
85async function sendBulkEmail() {
86 try {
87 console.log('📧 Sending bulk email via Brevo...');
88
89 const result = await emailService.sendMail({
90 to: ['user1@example.com', 'user2@example.com', 'user3@example.com'],
91 subject: 'Important Update',
92 html: `
93 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto;">
94 <h1 style="color: #333;">Important Update</h1>
95 <p>Dear valued user,</p>
96 <p>We have an important update regarding our service.</p>
97 <p>Best regards,<br>The Pollinations AI Team</p>
98 </div>
99 `,
100 });
101
102 if (result.success) {
103 console.log('✅ Bulk email sent successfully!', result.messageId);
104 } else {
105 console.error('❌ Failed to send bulk email:', result.error);
106 }
107 } catch (error) {
108 console.error('❌ Error:', error.message);
109 }
110}
111
112// Example 5: Verify Brevo connection
113async function verifyBrevoConnection() {

Callers 1

runExamplesFunction · 0.70

Calls 3

logMethod · 0.80
errorMethod · 0.80
sendMailMethod · 0.65

Tested by

no test coverage detected