无法发送邮件重置用户密码! 这是我的index.js文件
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'myAppId',
verifyUserEmails: false, //depends on your needs, you can set it to false
emailVerifyTokenValidityDuration: 2 * 60 * 60, // in seconds (2 hours = 7200 seconds)
preventLoginWithUnverifiedEmail: false, // defaults to false
publicServerURL: 'https://a.herokuapp.com/parse',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'App',
// The email adapter
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
// The address that your emails come from
fromAddress: 'a@a.com',
// Your domain from mailgun.com
domain: 'https://api.mailgun.net/v2/mg.a.com/messages',
// Your API key from mailgun.com
apiKey: 'key-aaaaaaaaaaaaaaaaaaaaaaa'
}
},
服务器工作正常(加载所有数据) Mailgun工作得很好(从终端发送电子邮件就像魅力一样)
但是当我尝试重置密码时,日志中会显示以下消息:
2017-07-17T22:20:06.550173 + 00:00 heroku [router]:at = info method = POST path =" / parse / requestPasswordReset" host = a.herokuapp.com request_id = ff60cd44-6557-464c-9f17-aaaaaaaaa fwd =" 12.345.678.90" dyno = web.1 connect = 1ms service = 77ms status = 200 bytes = 483 protocol = https
没有任何反应
我做错了什么????? 如果我将删除appName,我将在日志中看到:
密码重置功能需要appName,publicServerURL和emailAdapter。' } code = 1,message =密码重置功能需要appName,publicServerURL和emailAdapter。
如果我要求错误用户重置,我会在日志中看到:
2017-07-17T22:27:23.340663 + 00:00 app [web.1]:消息:'没有用户发现电子邮件a@gmail.comy.' } code = 205,message =没有用户发现电子邮件a@gmail.comy。 2017-07-17T22:27:23.349814 + 00:00 app [web.1]:[object Object]
这意味着一切正常,但它不是发送电子邮件
感谢您的回复。