如何获得用户在Strapi提交的表格的回复邮件



我是Strapi的新手,我想创建功能,当用户提交表单时(从React js中制作的前端(,作为响应,用户将收到一封表单提交邮件。

您可以使用以下文档:https://docs.strapi.io/dev-docs/plugins/email示例:

// This code example can be used in a controller or a service path: ./src/api/{api name}/controllers/{api name}.js or ./src/api/{api name}/services/{api name}.js
await strapi.plugins['email'].services.email.send({
to: 'valid email address',
from: 'your verified email address', //e.g. single sender verification in SendGrid
cc: 'valid email address',
bcc: 'valid email address',
replyTo: 'valid email address',
subject: 'The Strapi Email plugin worked successfully',
text: 'Hello world!',
html: 'Hello world!',
}),

发送电子邮件以响应发出的请求类型

最新更新