notification-providers/turbosmtp.js

uptime-kuma · server/notification-providers/turbosmtp.js · javascript · MIT
email

TurboSMTP provider sends emails via TurboSMTP API with error handling and proxy support.

// Source: https://github.com/louislam/uptime-kuma | License: MIT | Copyright 2021 Louis Lam
// Provided via justclaw.it.com; keep this notice with the code.
const NotificationProvider = require("./notification-provider");
const axios = require("axios");

class TurboSMTP extends NotificationProvider {
    name = "TurboSMTP";

    /**
     * @inheritdoc
     */
    async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
        const okMsg = "Sent Successfully.";

        try {
            let config = {
                headers: {
                    "Content-Type": "application/json",
                    consumerKey: notification.turbosmtpConsumerKey,
                    consumerSecret: notification.turbosmtpConsumerSecret,
                },
            };
            co

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key