我正在尝试通过
通过SENDGRID API发送电子邮件https://packagist.org/packages/sendgrid/sendgrid
我正在通过上面的链接使用“ Hello Email”代码
但是当我尝试运行电子邮件时,这就是我得到的
Array
(
[0] => HTTP/1.1 401 UNAUTHORIZED
[1] => Server: nginx
[2] => Date: Wed, 03 Apr 2019 04:33:59 GMT
[3] => Content-Type: application/json
[4] => Content-Length: 62
[5] => Connection: keep-alive
[6] => Access-Control-Allow-Methods: HEAD, GET, OPTIONS, DELETE
[7] => Access-Control-Max-Age: 21600
[8] => Access-Control-Expose-Headers: Link, Location
[9] => Access-Control-Allow-Origin: *
[10] => Access-Control-Allow-Headers: AUTHORIZATION, Content-Type, On-behalf-of, x-sg-elas-acl, X-Recaptcha, X-Request-Source
[11] => Content-Security-Policy: default-src https://api.sendgrid.com; frame-src 'none'; object-src 'none'
[12] => X-Content-Type-Options: nosniff
[13] => Strict-Transport-Security: max-age=31536000
[14] =>
[15] =>
)
{"errors":[{"field":null,"message":"authorization required"}]}
即使我已在实时服务器上上传,但仍然成功,仍尝试创建另外2,3个具有完全访问权限的API密钥,但出现相同的问题。
请帮助我...