using (MailMessage message = new MailMessage()) { message.From = new MailAddress(userEmail.InnerText); message.To.Add(new MailAddress("[email protected]")); message.Subject = selection.Text; message.Body = htmlBody(); message.IsBodyHtml = true; SmtpClient client = new SmtpClient("142.16.0.142"); client.Send(message); }
如何驗證client.send(message)是否成功?c#MailMessage類 - 如何驗證服務器執行的消息