简体   繁体   English

使用OAuth发送电子邮件

[英]Send email using OAuth

I am trying to send an email through gmail using oauth credentials. 我正在尝试使用oauth凭据通过gmail发送电子邮件。 I cannot seem to find any smtp class in the framework, or open source alternatives that work with oauth access token. 我似乎无法在框架中找到任何smtp类,或者使用oauth访问令牌的开源替代品。

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. 我在谷歌开发者的网站Gmail IMAP和SMTP上使用OAuth - 概述Gmail IMAP和SMTP使用OAuth - 协议发现了这些参考,但我不确定是谁实现它。

  1. Are there any open source classes that support sending emails that are authenticated by oauth credentials? 是否有任何开源类支持发送经过oauth凭证验证的电子邮件?
  2. Is there any wrapper that helps write custom smtp calls ? 是否有任何有助于编写自定义smtp调用的包装器?

Thank you 谢谢

I think you can just use SmtpClient in the System.Net.Mail namespace. 我想你可以在System.Net.Mail命名空间中使用SmtpClient。

This Q covers how to do it in detail: Sending Email via GMail and .NET 4 这个Q详细介绍了如何做到这一点: 通过GMail和.NET 4发送电子邮件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM