使用UNICODE String vb.net通过SMTP发送SMS

时间:2015-07-21 15:05:05

标签: vb.net unicode smtp

这是我的代码,我只得到???消息体中的字符, 我试图使用属性" mm.BodyEncoding = Encoding.UTF8",我也尝试添加" utf-8"的标题,从不适用于我

        Dim smtp = New SmtpClient()     
        smtp.EnableSsl =  UseSsl
        smtp.Host =  Host
        smtp.Port =  Port
        smtp.Credentials =  Credentials
        Dim mm = New MailMessage
        mm.From = New MailAddress(Credentials.UserName, ScreenName)
        mm.Subject = Subject
        mm.Body = "אבג"
        mm.IsBodyHtml = True 
        mm.To.AddRange(addresses)  
        smtp.Send(mm)

0 个答案:

没有答案