Posted on: 1/17/2014 6:13:48 AM | Views : 315

Hi, I've been trying to send out email. However, this error keeps coming to me.
The parameter 'address' cannot be an empty string. Parameter name: address I have already made sure that the user cannot enter a empty email address. The email address is stored in the database. However, whenever I try to send out a email it will prompt me this particular error. Why is this so? 
This is my set of code. Please help me see if there is anything wrong with this set of codes.
protected void SendMail() { string user = (string)Session["UserID"]; string Name = (string)Session["To_Who"]; MySqlConnection conn = new MySqlConnection(connStr); conn.Open(); MySqlCommand cmdE = new MySqlCommand("Select u.Name, c.ClassNo, b.To_Who, b.BookDate, b.BookReason, b.BookStatus, b.BookTime, u.Email, b.DateTime From User u, Bookings b, Class c WHERE u.UserID = b.UserID and u.UserID = '" ...

Go to the complete details ...