使用smtpClient发送邮件,VB.net

编程入门 行业动态 更新时间:2024-10-27 03:26:13
本文介绍了使用smtpClient发送邮件,VB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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.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

本文发布于:2023-08-07 10:22:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1318596.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发送邮件   smtpClient   net   VB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!