我收到了邮件发送的消息。但是在收件箱中没有新的电子邮件,我在其中找到了该电子邮件
server inetpub-> mailroot-> Queue
请告诉我解决方案
已编辑
public string btnSendmail()
{
// System.Web.Mail.SmtpMail.SmtpServer is obsolete in 2.0
// System.Net.Mail.SmtpClient is the alternate class for this in 2.0
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress("myemail@itaxsmart.com","");
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("mailsendtol@itaxsmart.com");
message.Subject = "Feedback";
message.IsBodyHtml = false;
message.Body = "Hello World" ;
smtpClient.Send(message);
return "Email successfully sent.";
}
catch (Exception ex)
{ return "Send Email Failed." + ex.Message;
}