Take the 2-minute tour ×

I am trying to establish a mail client connection with my mail server, where my mail server accepts just the first part of email rather the full one. Doing so in the program yields me an exception that the specified username string is not in a valid format. Here is the code used

SMTPMailClient client = new SMTPMailClient("Vijay", "Password1", server, port, subject, body, 

This statement works with a mail server accepting email address, wherein I supply the username as "vijay@xxxxx.com"

share|improve this question
thats a .net framework builtin –  Muthukumar Palaniappan Apr 24 '12 at 5:14
add comment

1 Answer

The client you use can't be found when googling. But a mail needs a sender, a most likely the class you use wants an address as both username and sender address.

You could always use SmtpClient to send the mail instead.

share|improve this answer
add comment

Your Answer


