第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

與 golang 中已驗(yàn)證的發(fā)件人身份錯(cuò)誤不匹配

與 golang 中已驗(yàn)證的發(fā)件人身份錯(cuò)誤不匹配

Go
手掌心 2022-06-01 11:40:46
當(dāng)用戶(hù)注冊(cè)時(shí),我正在處理發(fā)送的電子郵件。我正在免費(fèi)使用新的 SendGrid 帳戶(hù),但是當(dāng)我運(yùn)行我的函數(shù)時(shí),它會(huì)向我顯示以下錯(cuò)誤,誰(shuí)能告訴我我將如何解決它。下面是我的 Golang 函數(shù)func SendOtpMail(OTP string) (err error) {    from := mail.NewEmail("Test", "test@example.com")    subject := "Comfirmation Mail"    to := mail.NewEmail("puneet", "puneet123@gmail.com")    // plainTextContent := ""    htmlContent := "Your confirmation OTP is = " + OTP    message := mail.NewSingleEmail(from, subject, to, " ", htmlContent) // ("" = plainTextContent)    client := sendgrid.NewSendClient("Api_key")    response, err := client.Send(message)    fmt.Println(response)    fmt.Println(err)    return err}作為回應(yīng),它將返回控制臺(tái)下方的輸出:&{403 {"errors":[{"message":"The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements","field":"from","help":null}]} map[Access-Control-Allow-Headers:[Authorization, Content-Type, On-behalf-of, x-sg-elas-acl] Access-Control-Allow-Methods:[POST] Access-Control-Allow-Origin:[https://sendgrid.api-docs.io] Access-Control-Max-Age:[600] Connection:[keep-alive] Content-Length:[281] Content-Type:[application/json] Date:[Sat, 25 Apr 2020 12:56:25 GMT] Server:[nginx] X-No-Cors-Reason:[https://sendgrid.com/docs/Classroom/Basics/API/cors.html]]}我也在 2019 年實(shí)現(xiàn)了同樣的功能,然后它正在工作,但現(xiàn)在我想更改它,然后這向我顯示了這個(gè)錯(cuò)誤。這個(gè)你能幫我嗎。
查看完整描述

3 回答

?
慕森王

TA貢獻(xiàn)1777條經(jīng)驗(yàn) 獲得超3個(gè)贊

由于這是 sendgrid 為保護(hù)您的發(fā)送聲譽(yù)和維護(hù)合法發(fā)送行為而創(chuàng)建的新設(shè)置,因此他們要求客戶(hù)驗(yàn)證其發(fā)件人身份。由于這些舊的 sendgrid 帳戶(hù)不會(huì)受到影響,因此 2020 年 4 月 6 日之后創(chuàng)建的帳戶(hù)將能夠進(jìn)行發(fā)件人驗(yàn)證。

檢查此文檔以獲取信息 - https://sendgrid.com/docs/ui/sending-email/sender-verification


查看完整回答
反對(duì) 回復(fù) 2022-06-01
?
湖上湖

TA貢獻(xiàn)2003條經(jīng)驗(yàn) 獲得超2個(gè)贊

根據(jù) sendgrid 提供的文檔。在發(fā)送任何電子郵件之前,您應(yīng)該對(duì)發(fā)件人進(jìn)行身份驗(yàn)證,

有兩種方法可以做到

  1. 域認(rèn)證

  2. 單一發(fā)件人身份驗(yàn)證

請(qǐng)按照以下鏈接進(jìn)行單發(fā)件人身份驗(yàn)證

https://sendgrid.com/docs/ui/sending-email/sender-verification


查看完整回答
反對(duì) 回復(fù) 2022-06-01
?
揚(yáng)帆大魚(yú)

TA貢獻(xiàn)1799條經(jīng)驗(yàn) 獲得超9個(gè)贊

  • 驗(yàn)證您的電子郵件

  • 重啟你的服務(wù)器

  • 如果仍然存在錯(cuò)誤,則輸入 DEFAULT_FROM_EMAIL = yourverifiedgmail@gmail.com EMAIL_FROM=yourverifiedgmail@gmail.com

  • 重新啟動(dòng)服務(wù)器,錯(cuò)誤應(yīng)該消失了


http://img1.sycdn.imooc.com//6296dfe70001669312410202.jpg

查看完整回答
反對(duì) 回復(fù) 2022-06-01
  • 3 回答
  • 0 關(guān)注
  • 250 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)