mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 20:44:46 +00:00
Generate clients (#206)
This commit is contained in:
15
examples/email/send/node/sendEmail.js
Executable file
15
examples/email/send/node/sendEmail.js
Executable file
@@ -0,0 +1,15 @@
|
||||
import * as email from "m3o/email";
|
||||
|
||||
// Send an email by passing in from, to, subject, and a text or html body
|
||||
async function SendEmail() {
|
||||
let emailService = new email.EmailService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await emailService.send({
|
||||
from: "Awesome Dot Com",
|
||||
subject: "Email verification",
|
||||
textBody:
|
||||
"Hi there,\n\nPlease verify your email by clicking this link: $micro_verification_link",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await SendEmail();
|
||||
Reference in New Issue
Block a user