信箱不可用。服务器响应不允许中继 [英] mailbox unavailable. the server response was relay not permitted

查看:97
本文介绍了信箱不可用。服务器响应不允许中继的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我在vb.net中反馈表单的代码:



但是给出错误



below is my code for feedback form in vb.net:

but gives error

<pre>mailbox unavailable. the server response was relay not permitted </pre>





请帮助

thx提前。< br $>


web.configfile



pls help
thx in advance.

web.configfile

<system.net>
    <mailSettings>

        <smtp from="feedback@gorwalyouthstar.co.in">
        <network host="smtp.net4india.com" port="25" userName="grtgrt"              password="fgfhgf"



      </smtp>
    </mailSettings>
  </system.net>



















Protected Sub btnvsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnvsubmit.Click

       If Panel1.Visible = False Then
           Panel1.Visible = True
       End If


       Dim smtpClient As New SmtpClient()

       Dim MailMessage As New MailMessage()
       Dim EMail As MailMessage = New MailMessage()

       EMail.From = New MailAddress(txtvemail.Text)
       EMail.To.Add(New MailAddress("feedback@gorwalyouthstar.co.in"))

       EMail.Subject = "Feedback  " + txtvemail.Text
       EMail.Body = "Name: " + txtvname.Text + Environment.NewLine + "Email Id: " + txtvemail.Text + Environment.NewLine + "Country: " + txtvillage.Text + Environment.NewLine + "Message: " + txtvmsg.Text

       smtpClient.Host = "smtp.net4india.com" ''what is Smtp mail address ''
       ''smtpClient.EnableSsl = False
       smtpClient.Send(EMail)
       ''smtpClient.Credentials = New System.Net.NetworkCredential("", "password")

       Try
           ''smtpClient.Send(EMail)
           lblmsg.Text = "Thank you for sending us feedback!"
           txtvname.Text = ""
           txtvemail.Text = ""
           ''ddlCountry.SelectedValue = "---Select---"
           txtvillage.Text = ""
           txtvmsg.Text = ""

       Catch exc As Exception
           Response.Write("Send failure: " & exc.ToString())
           lblmsg.Text = "Try Again .. Data is not save Successfully!"
       End Try






   End Sub

推荐答案

这通常意味着您不在网络上,您所连接的SMTP服务器已启用。通常,ISP会阻止这种情况,以防止网络外的人使用他们的电子邮件服务器发送垃圾邮件。



您通常必须与SMTP服务器位于同一网络中''试图使用。
It usually means that you''re not on the network that the SMTP server you''re connect to is on. Normally ISPs block this to prevent people from outside their network from using their email servers to send spam.

You normally have to be inside the same network as the SMTP server you''re trying to use.


这篇关于信箱不可用。服务器响应不允许中继的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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