在C#中发送gmails [英] Sending gmails in C#

查看:82
本文介绍了在C#中发送gmails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在未经身份验证的情况下使用Gmail发送电子邮件?我的意思是发件人应该只使用他的电子邮件帐户,而不使用他的密码,应该发送电子邮件。如果这不可能,其他人怎么做呢?



我尝试过:



我已经完成了它并且消息发送完美但它需要我添加帐户密码,否则这将无效。

解决方案

要通过Gmail发送电子邮件,您必须使用密码。我非常怀疑谷歌会让所有人和他们的母亲代表其他人发送密码而不进行身份验证。



我认为交换提供代表其他用户发送的能力,只有在您通过身份验证并获得该用户框的权限之后。


您尝试做的事情称为消息中继,而gmail不允许您这样做而且它是您不应该使用gmail发送电子邮件的众多原因之一。使用你的webhost提供的smtp服务器,这可能允许中继(这就是别人做的方式)。



你不应该花时间去做ASP.NET论坛 [ ^ ]

How can i send an email using gmail without authentication? I mean the sender should only use his email account, without using his password and the email should be sent. If that's not possible how do others do it?

What I have tried:

I've already done it and the message is being sent perfectly but it needs me to add the account password or else this won't work.

解决方案

In order to send an email via gmail you must use a password. I highly highly doubt google would just let everyone and their mother send passwords on behalf of others without authentication.

I think exchange offers the ability to send on behalf of another user, only after you've authenticated and been given that permission on that users box.


What you're trying to do is called message relaying and gmail doesn't let you do it and it's one of the many reasons you shouldn't be using gmail to send email. Use the smtp server provided by your webhost instead which is likely to allow relaying (and that's how others "do it").

Things you shouldn't spend time doing | The ASP.NET Forums[^]


这篇关于在C#中发送gmails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆