开发者

Is there anyway to display Right To Left plain text mails?

开发者 https://www.devze.com 2023-01-17 07:08 出处:网络
I\'m sending mails in c# using SmtpClient. i\'m sending the mails as plain text: message.IsBodyHtml开发者_JS百科 =False;

I'm sending mails in c# using SmtpClient. i'm sending the mails as plain text:

message.IsBodyHtml开发者_JS百科 =False;

how can I send them as RTL? with HTML mails it's very easy-just tag them as RTL.

Sample code:

    public void SendEmail(bool isJapanese)
    {
        try
        {
            MailAddress from = new MailAddress(FromEmail,FromDisplay);
            MailAddress to = new MailAddress(ToEmail, ToDisplay);
            MailMessage message = new MailMessage( from, to);
                message.Subject = Subject;
            if (!IsHTML)
                Body = Body.Replace("<br/>", "\r\n").Replace("<br/>", "\r").Replace("<br/>", "\n");
            message.Body =Body;

            message.BodyEncoding = Encoding.UTF8;
                message.SubjectEncoding = Encoding.UTF8;
            message.IsBodyHtml = IsHTML;
            smtpClient.Send(message);
        }
        catch (Exception ex)
        {
            ex.HelpLink += "class MailSender, fn SendMail(); ";
            Log(ex);
        }
    }


there is no way to indeciate alignment of plain text mails. by the way- Gmail is autodetcting RTL languages but this is the only provider i see that doe's that.

0

精彩评论

暂无评论...
验证码 换一张
取 消