使用smtpClient发送邮件,VB.net [英] using smtpClient to send mail, VB.net

查看:212
本文介绍了使用smtpClient发送邮件,VB.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim add_from As New MailAddress("hien3@grc.vn", "CÔNG TY TNHH ABC", System.Text.Encoding.UTF8)
       Dim add_to As MailAddress
       add_to = New MailAddress("vanhien0101@yahoo.com.vn", "DC hien", System.Text.Encoding.UTF8)
       Dim mm As MailMessage
       mm = New MailMessage(add_from, add_to)
       mm.Subject = "hello"
       mm.Body = "How are you?"
       Dim client As New SmtpClient("(ip address of server)", Convert.ToInt32(25))
       client.Send(mm)
       ' Error :Mailbox unavailable. The server response was: <mail address>, Recipient unknown
       ' please help me fix this error. Thanks!
   End Sub

推荐答案

这看起来像是SMTP mail error.

系统正在尝试将表单电子邮件发送到的电子邮件地址中,看起来像是一个错字.

请注意以下几点:
1.检查站点的主机"区域中是否具有有效的SMTP服务器设置.
2. 检查要发送表单的所有电子邮件地址.
3.如果无法发现错误. 删除表单所指向的地址,然后重新开始.
4.请记住,登录用户也必须具有有效的电子邮件地址,否则表单选项的副本将不适用于他们.

这是类似的质量检查邮箱不可用. [
This looks like an SMTP mail error.

Looks like a typo in the email address that the system is trying to send the form email to.

Follow some points:
1. Check that you have valid SMTP server settings in the Host area of the site.
2. Check all email addresses that the form is being sent to.
3. If you cannot spot the error. Remove the addresses the form is addressed to and start again.
4. Remember that a logged in user has to have valid email addresses as well or the copy of the form option will not work to them.

Here is similar QA Mailbox unavailable.[^], check out if you get some help from it.


这篇关于使用smtpClient发送邮件,VB.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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