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

Function sendSimpleEmail

apps/micro/examples/resend-example.js:19–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

runExamplesFunction · 0.70

Calls 3

logMethod · 0.80
errorMethod · 0.80
sendMailMethod · 0.65

Tested by

no test coverage detected