通过具有以下OS Vista的.net窗口应用程序中的交换服务器发送邮件. [英] send the mail through exchange server in .net window application having the OS Vista as below..

查看:49
本文介绍了通过具有以下OS Vista的.net窗口应用程序中的交换服务器发送邮件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过具有以下OS Vista的.net窗口应用程序中的交换服务器发送邮件..

MailMessage completeMessage = new MailMessage("mailroom@ericsson.com","rajendra.koranga@gmail.com","test","sdfsfs");
在邮件服务器位置创建smtp客户端
SmtpClient客户端=新的SmtpClient("localhost");
添加凭据
client.UseDefaultCredentials = true;
试试
{
发送消息
client.Send(completeMessage);
}
catch(Exception)
{
投掷;//失败者发送邮件
}
我收到错误消息,因为失败者在投掷邮件时发送邮件...

有人可以帮我吗..


感谢

hi guys i m trying to send the mail through exchange server in .net window application having the OS Vista as below..

MailMessage completeMessage = new MailMessage("mailroom@ericsson.com","rajendra.koranga@gmail.com", "test", "sdfsfs");
create smtp client at mail server location
SmtpClient client = new SmtpClient("localhost");
add credentials
client.UseDefaultCredentials = true;
try
{
send message
client.Send(completeMessage);
}
catch (Exception)
{
throw;//failer sending mail
}
i am getting the error as failer sending mail at throw...

can someone help me please..


thanks

推荐答案

"SmtpClient client = new SmtpClient(" localhost);"
您确定您的Exchange Server在Vista计算机上运行吗?用运行Exchange Server的计算机的名称(或更好的是:IP地址)替换"localhost".
"SmtpClient client = new SmtpClient("localhost");"
Are you sure that your Exchange Server is running on your Vista computer? Replace "localhost" with the name - or better: with the IP address - of the computer where the Exchange Server is running on.


这篇关于通过具有以下OS Vista的.net窗口应用程序中的交换服务器发送邮件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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