使用 VB.NET 发送电子邮件
我正在为我的大学建立一个房间预订系统,当老师预订房间时我想发送一封电子邮件提醒他们。我在互联网上通过此链接找到了一个:
http://www.osix。 net/modules/article/?id=377
但是,当我尝试使用该代码时,出现错误:“‘String’类型的值无法转换为‘System.Net.Mail.MailAddress’”
有人可以吗请告诉我如何做到这一点?
赞赏。
I am building a room booking system for my college and I would like to send out an email when a teacher books a room to remind them. I have found one on the internet at this link:
http://www.osix.net/modules/article/?id=377
But when I try and use that code I get an error: "Value of type 'String' cannot be converted to 'System.Net.Mail.MailAddress'"
Can someone give me the low down of how to do this?
Appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不看看
SmtpMail 上的示例
MSDN 文档 如果你想知道如何使用该类?请注意,该 API 现在已过时 - 您应该查看 System.Net.Mail 命名空间,特别是
SmtpClient
类。同样,文档中有示例。Why not look at the example on the
SmtpMail
MSDN documentation if you want to know how to use that class?Note that that API is now obsolete though - you should look at the System.Net.Mail namespace and in particular the
SmtpClient
class. Again, there are examples in the documentation.