我试图在本地运行的parse-server实例上测试密码重置流程。每次发送密码重置请求时,我都会收到以下错误error: Uncaught internal server error. Trying to send a reset password but no adapter is set undefined
。我知道我应该在cli-definitions中配置emailAdapter,但我不太确定我应该放在那里的确切内容。我尝试将ParseServer.js中的构造函数更改为
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
// The address that your emails come from
fromAddress: 'parse@example.com',
// Your domain from mailgun.com
domain: 'example.com',
// Your API key from mailgun.com
apiKey: 'key-mykey',
}
}
但这不起作用。非常感谢任何帮助!
答案 0 :(得分:6)
我自己配置了这个,我想你可能只是缺少一些参数。
在index.js或其他正在初始化ParseServer的文件中的配置中,您需要以下所有内容:
verifyUserEmails: true,
// Same as the SERVER_URL used to configure ParseServer, in my case it uses Heroku
publicServerURL: 'http://MY_HEROKU_APP.herokuapp.com/parse',
appName: 'MY_APP',
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
fromAddress: 'no-reply@example.com',
domain: 'example.com',
apiKey: 'key-XXXXXX',
}
}