Getting "The specified string is not in the form required for an e-mail address." error while sending from from Vb.net.

userid "abc-xyz.net"
displayname "abc"

If we send mail from gmail then mail is going proper but we have "-" in userid and becouse of that it is giving error.

Please give some solution.

A valid e-mail address contains "@" (ex: username@domain). I don't see that in your post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.