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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Email address can be unicode (.Net2.0)

Email address can be unicode (.Net2.0)

Scheduled Pinned Locked Moved ASP.NET
csharphelpwcfcomjson
5 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.
  • P Offline
    P Offline
    Parwej Ahamad
    wrote on last edited by
    #1

    Hi, Email address can be unicode like : Национа@аци.com (This russina Cyrillic chars) Problem is, I am using System.Net.Mail namespace in our project. When i am creating the email address object

    Message.From = new System.Net.Mail.MailAddress(from.Address, from.Name);

    then it's throwing an error: "The specified string is not in the form required for an email address"

    Parwej Ahamad R & D: REST services with WCF

    N 1 Reply Last reply
    0
    • P Parwej Ahamad

      Hi, Email address can be unicode like : Национа@аци.com (This russina Cyrillic chars) Problem is, I am using System.Net.Mail namespace in our project. When i am creating the email address object

      Message.From = new System.Net.Mail.MailAddress(from.Address, from.Name);

      then it's throwing an error: "The specified string is not in the form required for an email address"

      Parwej Ahamad R & D: REST services with WCF

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Use other overload which has encoding. (String, String, Encoding) [^]

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      P 1 Reply Last reply
      0
      • N N a v a n e e t h

        Use other overload which has encoding. (String, String, Encoding) [^]

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

        P Offline
        P Offline
        Parwej Ahamad
        wrote on last edited by
        #3

        Hi Navaneeth, This encoding defines for fromName (DisplayName) not for email address. For name it is working fine. I am asking about the Email Address.

        Parwej Ahamad R & D: REST services with WCF

        N 1 Reply Last reply
        0
        • P Parwej Ahamad

          Hi Navaneeth, This encoding defines for fromName (DisplayName) not for email address. For name it is working fine. I am asking about the Email Address.

          Parwej Ahamad R & D: REST services with WCF

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Parwej Ahamad wrote:

          I am asking about the Email Address.

          Well, I am not sure internationalization in email addresses are practical. Here[^] is the RFC which explains internationalization. Try reading it.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

          P 1 Reply Last reply
          0
          • N N a v a n e e t h

            Parwej Ahamad wrote:

            I am asking about the Email Address.

            Well, I am not sure internationalization in email addresses are practical. Here[^] is the RFC which explains internationalization. Try reading it.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

            P Offline
            P Offline
            Parwej Ahamad
            wrote on last edited by
            #5

            Thanks Navaneeth, I will take a look.

            Parwej Ahamad R & D: REST services with WCF

            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