html - 我将如何将电子邮件发送给已创建个人资料的用户?
问题描述
基本上,一旦用户创建了个人资料,他们就会收到一条消息,说明个人资料已创建,并且会发送一封电子邮件,确认已创建的个人资料。这是我到目前为止的一个例子。
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: input.first_name.toLowerCase(),
last_name: input.last_name.toLowerCase(),
phone_number: input.phone_number.toLowerCase(),
org: input.org.toLowerCase(),
email: input.email.toLowerCase(),
password: input.password,
role: input.role
})
}).then(response => response.json())
.then(json =>{ //When the responce is a promise you .then the .json() to get the promise value
if (json){
dispatch(addUserSuccess());
toastr.success(
'Success!',
'User has been added'
'E-mail confirmation sent'
);
}
else{
dispatch(addUserFailure());
toastr.error(
'Failure',
'Unable to add new user'
)
};
});
};
};
解决方案
推荐阅读
- android - 数据更新后从 recyclerView 中删除项目
- react-native - 尝试结束代码时不断出现基于 React Native Maps 的解析错误
- android - Android Studio 3.5.2 找不到 USB 连接设备(但通过 adb 终端找到)
- python - AttributeError:“str”对象没有属性“find_all”
- html - 如何在不创建空白区域的情况下使图像被窗口大小吞噬
- mysql - SQL select last before by date and group by
- python - Python将绑定方法调用变为未绑定
- oracle - 关于为什么我在创建索引时出错的想法
- python - PyParsing Optional() 挂起
- python - 完全安装 tensorflow(所有模块)?