C# 做的邮箱发送功能 报错

mail.From = new MailAddress(from, fromuser);
                mail.Subject = "dsfdsf";
                mail.Body ="sdfsdf";
                mail.Priority = pri;
              
                SmtpClient cliect = new SmtpClient(smtpserver);
                cliect.Timeout = Convert.ToInt32(timeout);
                cliect.Port = Convert.ToInt32(smtpport);
                cliect.DeliveryMethod = SmtpDeliveryMethod.Network;
                cliect.Credentials = new System.Net.NetworkCredential(smtpuser, smtppass);
                cliect.UseDefaultCredentials = true;
                cliect.EnableSsl =true;
                cliect.Send(mail);

慕仙森
浏览 475回答 1
1回答

森林海

试试 cliect.EnableSsl = false;
打开App,查看更多内容
随时随地看视频慕课网APP