通过没有凭证认证密码asp.net在asp网络中发送电子邮件 [英] send email in asp net by without credentials authentication password asp.net

查看:75
本文介绍了通过没有凭证认证密码asp.net在asp网络中发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此代码。

I am using this code.

Dim mail As New MailMessage()
mail.[To].Add("pabc@gmail.com")
mail.From = New MailAddress("abc@gmail.com")
mail.Subject = "Email using Gmail"
mail.Body = ""


mail.IsBodyHtml = True
Dim smtp As New SmtpClient()
smtp.Host = "smtp.gmail.com"
smtp.EnableSsl = True
smtp.Port = 587
smtp.Credentials = New System.Net.NetworkCredential(  mail.From,password)
smtp.Send(mail)





但我想发送邮件而不检查密码或远程服务器ip。



but i want to sent mail without checking password or remot server ip.

推荐答案

您可能无法 - 大多数服务器都需要授权才能阻止人们发送消息,就好像它来自公司一样。

我可以看到想要这样做的唯一原因是生成垃圾邮件或网络钓鱼电子邮件,这是恶意活动。



我们这样做不得宽恕,支持或协助以任何方式,形式或方式生成恶意代码。这是专业开发人员的专业网站。



如果你想知道如何创建这样的东西,你需要访问一个黑客网站:但一定要禁用所有首先是防火墙和防病毒产品,或者他们不会信任你足以告诉你。
You probably can't - most servers require authorisation to prevent people form sending message as if it had originated with the company.
The only reason I can see for wanting to do this is to generate spam or phishing emails, which is malicious activity.

We do not condone, support or assist in the production of malicious code in any way, form or manner. This is a professional site for professional developers.

If you want to know how to create such things, you need to visit a hacking site: but be sure to disable all firewalls and antivirus products first or they won't trust you enough to tell you.


你不能在没有用户名和密码的情况下通过gmail发送,但你不应该通过gmail发送无论如何。如果您的站点位于Web主机上,请使用主机提供的smtp服务器(详细信息将在您的控制面板中)。如果您的站点位于本地网络上,请向网络管理员询问您可以使用的smtp服务器的详细信息。



https://forums.asp.net/post/5825785.aspx [ ^ ]
You can't send through gmail without a username and password, but you shouldn't be sending through gmail anyway. If your site is on a web host use the smtp server provided by the host (the details will be in your control panel). If your site is on a local network then ask the network admin for details of what smtp server you can use.

https://forums.asp.net/post/5825785.aspx[^]


这篇关于通过没有凭证认证密码asp.net在asp网络中发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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