【发布时间】:2016-01-15 12:39:50
【问题描述】:
我正在尝试使用 apikey 使用 sendgrid 在 node.js 中启动并运行一个简单的联系表单。目前还不清楚我哪里出错了。
我尝试了以下方法: 1.
var options = {
auth: {
api_user: 'xjh-4XqZGH6$HLT-IEOPFG',
api_key: 'SG.xjh-4XqZGH6$HLT-IEOPFG.Wl2rB-CN00-nj3x5NiKno7MpDk8DxTtvgJeZfDGGI' // fake obviously, but I would like to show the structure as I am not sure whether this is correct
}
};
和 2.
var options = {
auth: {
api_user: 'xjh-4XqZGH6$HLT-IEOPFG',
api_key: 'Wl2rB-CN00-nj3x5NiKno7MpDk8DxTtvgJeZfDGGI' // fake obviously, but I would like to show the structure as I am not sure whether this is correct
}
};
和 3.
var options = {
auth: {
api_user: 'apikey',
api_key: 'SG.xnh-4XqZGH6$HLT-IEOPFG.Wl2rB-CN00-nj3x5NiKno7MpDk8DxTtvgJeZfDGGI' // fake obviously, but I would like to show the structure as I am not sure whether this is correct
}
};
它不断返回错误的用户名/密码。
它适用于我的用户名 (api_user) 和密码 (api_key)。
谁能解释我需要做什么?
干杯,迈克
【问题讨论】:
标签: sendgrid nodemailer