【问题标题】:How do you configure an emailAdapter for parse-server?如何为解析服务器配置 emailAdapter?
【发布时间】:2016-08-08 20:27:23
【问题描述】:

我正在尝试在本地运行的解析服务器实例上测试密码重置流程。每次我发送密码重置请求时,都会收到以下错误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',
    }
  }

但这没有用。非常感谢任何帮助!

【问题讨论】:

    标签: parse-platform passwords reset mailgun parse-server


    【解决方案1】:

    我自己刚刚配置了这个,我想你可能只是缺少一些参数。

    在您的 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',
        }
     }
    

    【讨论】:

    • publicServerUrl 与 SERVER_URL 相同是我的问题,我相信。谢谢!
    • 嗨,James,你在哪里添加了这段代码?当我添加这个时,我的应用程序不工作,没有收到任何数据。你能帮忙吗?
    • index.js 文件。它是在 var parseConfig = { 下添加的
    • 快速提问,这个api key是公钥还是私钥?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多