与希伯来邮件主题的问题

时间:2014-12-11 12:15:40

标签: c# email dkim

我有下一个问题:

string Domain = string.Empty;
string Selector = string.Empty;
IPrivateKeySigner privateKey = null;    

Domain = "MyDomain.co.il";
Selector = "MyDomaincoil";
 privateKey = PrivateKeySigner.Create(PK_Coil); //PK_Coil - var with another Dkim 

var msg = new DKIM.MailMessage();

msg.To.Add("check-auth@verifier.port25.com"); // for check
msg.From = new MailAddress("daabaev@gmail.com", "Email head", System.Text.Encoding.UTF8);
msg.Subject = "Jumbomail - קיבלת מייל חדש‎";  // hebrew title

msg.Body = "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\r\n    <title></title>\r\n</head>\r\n<body style=\"margin: 0px 0px 0px 0px; margin-right: auto; margin-left: auto; font-family: arial, Calibri, 'lucida grande';\r\n    font-style: italic; font-size: 16px;\">\r\n    <div style=\"font-size:14px;margin-left:auto;margin-right:auto;width:680px;text-align:center\">\r\n\t\t#LANG#<br />\r\n\t</div>\r\n\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width: 680px;\" align=\"center\">\r\n        <tr>\r\n            <td style=\"width: 680px;\">\r\n                <!--// Start Header -->\r\n                <div>\r\n                    &nbsp;</div>\r\n                <div style=\"width: 680px; text-align: center;\">\r\n                    <img src=\"http://localhost:6169/GeneralHandlers/LoadUserMailImage.ashx?type=header&image=header_270053_8_2014_16_45_21.jpg&pathId=2\" alt=\"\"\r\n                        title=\"\" style=\"border: 0px; width: 680px;\" />\r\n                </div>\r\n                <div>\r\n                    &nbsp;</div>\r\n                <!--// End Header -->\r\n                <!--// Start Body -->\r\n\t\t\t\t<div style=\"WIDTH: 680px; FONT-FAMILY: Arial\"> <table style=\"WIDTH: 680px; FONT-FAMILY: arial; FONT-SIZE: 14px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tbody> <tr> <td style=\"WIDTH: 15px\"></td> <td style=\"WIDTH: 650px\"> <div style=\"DIRECTION: rtl\" dir=\"rtl\"> <table style=\"WIDTH: 680px; FONT-FAMILY: arial; FONT-SIZE: 14px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td align=\"center\" style=\"width: 400px\"> <div style=\"TEXT-ALIGN: center; direction: rtl\"> <span style=\"FONT-SIZE: 18px; FONT-WEIGHT: bold\">שלום</span>, <br> <span style=\"FONT-WEIGHT: bold\">or@netbiz.co.il</span> <span style=\"direction:rtl\"> שלח/ה אלייך מייל באמצעות Jumbomail. </span><br> <div style=\"TEXT-ALIGN: right; DIRECTION: rtl\"> <br> <div style=\"TEXT-ALIGN: right; DIRECTION: rtl\"> <br> <span style=\"FONT-WEIGHT: bold\"></span> <br> <br>  </div> </div> <br> </div> </td> <td style=\"width: 20px; BORDER-RIGHT: #cccccc 1px solid; FONT-SIZE: 1px; width: 1px; height: 200px;\"> &nbsp; </td> <td align=\"center\" style=\"width: 280px\"> <a href=\"http://localhost:6169/Downloads.aspx?sid=4D6769335344774F6D646B3D\"> <img title=\"לחצו כאן להורדת הקבצים\" border=\"0\" alt=\"לחצו כאן להורדת הקבצים\" src=\"http://localhost:6169/App_Themes/MailTemplate/he-IL/downloadbtn.jpg\" /> </a> <br> <a href=\"http://localhost:6169/Downloads.aspx?sid=4D6769335344774F6D646B3D\">להורדת הקבצים לחצו כאן</a><br> <br> <span style=\"COLOR: #797979\"> <span dir=\"rtl\" style=\"FONT-WEIGHT: bold\">לתשומת ליבך:</span> מייל זה יהיה נגיש להורדה עד לתאריך 25/12/2014. </span><br> </td> </tr> </table> <div> </div> <br> <div> <div align=\"right\"><img alt=\"\" title=\"\" style=\"border: 0px;\" src=\"http://localhost:6169/GeneralHandlers/LoadUserMailImage.ashx?type=logo&image=logo_270053_8_2014_16_45_38.jpg&pathId=1\" /></div> <br> </div> <div> <br> </div> </div> </td> <td style=\"WIDTH: 15px\"></td> </tr> </tbody> </table> </div>\r\n                <!--// End Body -->\r\n                <!--// Start Footer -->\r\n                    <div style=\"border-top: 1px solid #e1e4e7;\">\r\n                        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"680px\" style=\"direction: ltr;\">\r\n                            <tr>\r\n                                <td style=\"text-align: left; padding: 0px; margin: 0px; border: 0px; height: 42px;\r\n                                    width: 11px;\">\r\n                                    <img src=\"http://localhost:6169/App_Themes/MailTemplate/mail-user-footer-left.jpg\"\r\n                                        style=\"width: 11px; height: 42px; border: 0px; float: left;\" alt=\"\" />\r\n                                </td>\r\n                                <td style=\"background: #b5bbc2; font-size: 1px; height: 42px; width: 670px; padding: 0px;\r\n                                    margin: 0px;\">\r\n\t\t\t\t\t\t\t\t&nbsp;\r\n                                </td>\r\n                                <td style=\"text-align: right; height: 42px; padding: 0px;\r\n                                    margin: 0px; border: 0px; width: 11px;\">\r\n                                    <img src=\"http://localhost:6169/App_Themes/MailTemplate/mail-user-footer-right.jpg\"\r\n                                        style=\"width: 11px; height: 42px; border: 0px; float: right;\" alt=\"\" />\r\n                                </td>\r\n                            </tr>\r\n                        </table>\r\n                    </div>\r\n                <!--// End Footer -->\r\n            </td>\r\n        </tr>\r\n    </table>\r\n</body>\r\n</html>";

msg.Sender = new MailAddress("company email.co.il");
msg.IsBodyHtml = true;

DkimSigner dkim = new DkimSigner(privateKey, Domain, Selector, new string[] { "From", "To", "Subject" });

msg.DkimSign(dkim);
System.Net.Mail.SmtpClient c = new System.Net.Mail.SmtpClient();

c.Port = 25;
c.Host = "my host";

c.Send(msg);

所以,如果我尝试发送带有英文标题的消息 - 我没有问题 - 我收到了邮件;签名:

但是,如果我切换到希伯来语标题(我只更改标题) - 我收到的邮件没有签名:

伙计我需要做什么?谢谢。 (对不起我的英文)

0 个答案:

没有答案