我喜欢从使用ESMTP的域发送邮件。我在c#3.5中使用smtp客户端但得到响应5.5.2
我的代码就像
SmtpClient client = new SmtpClient
{
Host = txtHost.Text.Trim(),
Port = Convert.ToInt32(txtport.Text.Trim()),
EnableSsl = chkEnableSSL.Checked,
DeliveryMethod = SmtpDeliveryMethod.Network,
Credentials = new System.Net.NetworkCredential(your_id, your_password),
UseDefaultCredentials = false,
Timeout = 100000,
};
MailMessage mm = new MailMessage(your_id, txtTo.Text.Trim(), txtSubject.Text, txtBody.Text);
client.Send(mm);
有没有办法使用.Net 3.5使用ESMTP?