Posted on: 7/24/2013 8:38:58 AM | Views : 227

Hi all, I am facing some errors here. Basically, I want to send a email to many email address. However, whenever I click send, I will only be able to sent to 1 email address instead of sending to all the email addresses. The worst thing is it is not showing me any error messages thus I'm unable to find out what actually went wrong. The following are the codes i used :
protected void sendMail() { string user = (string)Session["UserID"]; string sender = (string)Session["SenderID"]; SqlConnection conn = new SqlConnection(connStr); conn.Open(); SqlCommand cmdMassAnnouncement = new SqlCommand("Select TOP 1 u.UserID, u.Email, a.AnnHeader, a.AnnMessage, a.AnnTimeStamp, a.SenderID, a.ClassID, a.RemindDate FROM [Announcement] a, [User] u WHERE a.SenderID = u.UserID ORDER BY AnnTimeStamp DESC;", conn); SqlCommand cmdMassEmailAdd = new SqlCommand("Select UserID, Name, Email, AccountType from [User] where AccountT ...

Go to the complete details ...