使用 OAuth 发送电子邮件

发布于 2024-12-26 01:35:01 字数 455 浏览 4 评论 0原文

我正在尝试使用 oauth 凭据通过 gmail 发送电子邮件。 我似乎无法在框架中找到任何 smtp 类,或者使用 oauth 访问令牌的开源替代方案。

我在 Google 开发者网站 使用 OAuth 的 Gmail IMAP 和 SMTP - 概述 和 < a href="http://code.google.com/apis/gmail/oauth/protocol.html" rel="noreferrer">使用 OAuth - 协议的 Gmail IMAP 和 SMTP,但我不确定该找谁实施它。

  1. 是否有任何开源类支持发送通过 oauth 凭据进行身份验证的电子邮件?
  2. 是否有任何包装器可以帮助编写自定义 smtp 调用?

谢谢

I am trying to send an email through gmail using oauth credentials.
I cannot seem to find any smtp class in the framework, or open source alternatives that work with oauth access token.

I found these references on google developer's website Gmail IMAP and SMTP using OAuth - Overview and Gmail IMAP and SMTP using OAuth - Protocol, but I am not sure who to implement it.

  1. Are there any open source classes that support sending emails that are authenticated by oauth credentials?
  2. Is there any wrapper that helps write custom smtp calls ?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荒岛晴空 2025-01-02 01:35:01

我认为您可以在 System.Net.Mail 命名空间中使用 SmtpClient 。

此问题详细介绍了如何操作:通过 GMail 和 .NET 4 发送电子邮件

I think you can just use SmtpClient in the System.Net.Mail namespace.

This Q covers how to do it in detail: Sending Email via GMail and .NET 4

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文