Indy.net发送邮件后,接收到发现中文乱码
Indy.net发送邮件后,接收到发现中文乱码
string smtpHost = "smtp.yourserver.com";
Indy.Sockets.IndySMTP.SMTP smtp = new Indy.Sockets.IndySMTP.SMTP();
Indy.Sockets.IndyMessage.Message msg = new Indy.Sockets.IndyMessage.Message();
msg.From.Address = "name@yourserver.com";
msg.Recipients.EMailAddresses = "youremail@server";
msg.Subject = "Indy 测试主题";
msg.Body.Text = "内容测试";
smtp.AuthType = Indy.Sockets.IndySMTP.SMTPAuthenticationType.atDefault;
smtp.Host = smtpHost;
smtp.Username = "name@yourserver.com";
smtp.Password = "password";
smtp.Connect();
smtp.Send(msg);
smtp.Disconnect();
不知如何解决,第一次使用indy.net,之前在BCB中用的INDY就没问题