strapi - Strapi 在用户注册时返回错误代码 400
问题描述
每次我尝试注册测试用户时,Strapi 用户注册都会返回错误 400 Bad Request,但是用户确实会在 Users 集合中创建。
我使用的是标准的 Strapi 电子邮件插件(不是发送网格插件),每次注册用户时,此插件都不会发送电子邮件,导致无法确认用户。
在上图中,它返回 400 错误,但用户已创建。此外,如何使用 Strapi 标准电子邮件插件发送确认电子邮件。
Public role
已启用所有身份验证权限
如何修复此错误并在新用户注册时发送确认电子邮件?
解决方案
I think it's because you use the default email provider (sendmail). And your computer is not an available smtp server.
So I suggest you to install strapi-email-nodemailer https://www.npmjs.com/package/strapi-email-nodemailer
Then in your admin panel, got to Plugins (menu link) > Email (cog icon) and the select nodemailer provider and set the smtp server you want to use.
If you have trouble to setup correct information I suggest you to check how nodemailer node module work. strapi-email-provider is just a connector to use nodemailer from Strapi.
推荐阅读
- algorithm - 在 O(n log(log n)) 中对数组进行排序
- android - GridLayout 未显示在我的设备上
- python - HTTPS POST 以使用 python 请求访问目录
- javascript - 无法在固定标题内滚动移动下拉菜单
- javascript - Showing a toast notification on form submission
- sql - SQL Get Only Most Recent Record for A User
- c# - 自定义 JsonConverter 未启动
- javascript - 在 Node js 中读取动态 json 数据
- python - 在keras中设置模型的输入形状
- java - Eclipse doesn't show content of jar files