Emails sent using Gmail API are being flagged as phishy by Gmail

青春壹個敷衍的年華 提交于 2020-05-16 14:54:52

问题


When I send an email using the Gmail API, recipients that are using the Gmail web interface are getting a phishing warning when they open the email.

However, when I send the exact same email content through the same Gmail account but using the web UI, the recipients do not get the phishing warning.

The only difference I can find between the two received emails, is that the one sent using the API has this additional header:

Received: from 114692869688 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Jun 2019 11:37:51 -0500

Does anyone know how to resolve this problem?


回答1:


There are two options:

  1. Send an email through Gmail SMTP (Simple Mail Transfer Protocol, a protocol for sending e-mail messages between servers)
  2. Authorizing Your App with Gmail - All requests to the Gmail API must be authorized by an authenticated user. Gmail uses the OAuth 2.0 protocol for authenticating a Google account and authorizing access to user data.

When you get an email that looks suspicious, here are a few things to check for:

  • Check that the email address and the sender name match.
  • Check if the email is authenticated.
  • Hover over any links before you click on them. If the URL of the link doesn't match the description of the link, it might be leading you to a phishing site.
  • Check the message headers to make sure the "from" header isn't showing an incorrect name.**

Yes, the message header is important when sending an email using Gmail API. You will need to trace an email with its full headers.



来源:https://stackoverflow.com/questions/56548494/emails-sent-using-gmail-api-are-being-flagged-as-phishy-by-gmail

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!