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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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

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

Go
手掌心 2022-06-01 11:40:46
當(dāng)用戶注冊時,我正在處理發(fā)送的電子郵件。我正在免費使用新的 SendGrid 帳戶,但是當(dāng)我運行我的函數(shù)時,它會向我顯示以下錯誤,誰能告訴我我將如何解決它。下面是我的 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),它將返回控制臺下方的輸出:&{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 年實現(xiàn)了同樣的功能,然后它正在工作,但現(xiàn)在我想更改它,然后這向我顯示了這個錯誤。這個你能幫我嗎。
查看完整描述

3 回答

?
慕森王

TA貢獻1777條經(jīng)驗 獲得超3個贊

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

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


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

TA貢獻2003條經(jīng)驗 獲得超2個贊

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

有兩種方法可以做到

  1. 域認(rèn)證

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

請按照以下鏈接進行單發(fā)件人身份驗證

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


查看完整回答
反對 回復(fù) 2022-06-01
?
揚帆大魚

TA貢獻1799條經(jīng)驗 獲得超9個贊

  • 驗證您的電子郵件

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

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

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


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

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

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號

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