Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Send Mail with UTF-8 Format

Send Mail with UTF-8 Format

Scheduled Pinned Locked Moved ASP.NET
csharphelptutorialquestionasp-net
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Delphi Boy
    wrote on last edited by
    #1

    Hi there. I read an article on how to send mails from my ASP.NET C# pages using SmtpMail.Send(). It works great but when I type Arabic characters for example, the receiver only sees "???????????" instead of what I wrote. How can I solve this problem? If I type these characters in a Yahoo Mail, the receiver sees them correctly. My page is set to utf-8 with unicode signature. Please help. Thanks.

    J 1 Reply Last reply
    0
    • D Delphi Boy

      Hi there. I read an article on how to send mails from my ASP.NET C# pages using SmtpMail.Send(). It works great but when I type Arabic characters for example, the receiver only sees "???????????" instead of what I wrote. How can I solve this problem? If I type these characters in a Yahoo Mail, the receiver sees them correctly. My page is set to utf-8 with unicode signature. Please help. Thanks.

      J Offline
      J Offline
      jc net
      wrote on last edited by
      #2

      Try these lines: message.SubjectEncoding = System.Text.Encoding.GetEncoding("utf-8"); message.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");

      D 1 Reply Last reply
      0
      • J jc net

        Try these lines: message.SubjectEncoding = System.Text.Encoding.GetEncoding("utf-8"); message.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");

        D Offline
        D Offline
        Delphi Boy
        wrote on last edited by
        #3

        Thanks buddy! It worked great ;)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups