Tag: firebase mailgun

从angular色2应用程序的Firebase云端函数发送mailgun电子邮件

我正尝试使用Firebase云端函数的Mailgun API来发送电子邮件。 我已经尝试在Cloud Function中实现相同的nodejs教程,但是我总是得到“错误:无法处理请求”。 请问我做错了什么。 云端函数代码如下: <pre> <code> var functions = require('firebase-functions'); var nodemailer = require('nodemailer'); var auth = { auth: { api_key: '###################', domain: 's###############g' } } exports.helloWorld = functions.https.onRequest((request, response) => { response.send("Hello from Firebase!"); }); var nodemailerMailgun = nodemailer.createTransport(auth); exports.sendEmail = functions.https.onRequest((request, response) =>{ //app.get('/', function(req, res) { test(); }); function test(){ […]