Send bulk email with attachment in asp.net2.0


// include the below two namescapces
Using System.Net;
Using System.Net.Mail;


_mMailServer = "122.166.13.31"; // your servrer ip address
_mPort = 25; // your port number

objMessage = new MailMessage();


Attachment attach = new Attachment(UpldProdImage1.PostedFile.FileName);


SmtpClient objSmtpClient = new SmtpClient(_mMailServer, 25);//, 25

objSmtpClient.UseDefaultCredentials = true;


MailAddress mfrom = new MailAddress(txtFrom.Text, "GSS Admin");

objMessage.To.Add(Convert.ToString(to address list); // adding all the recpients to the "TO" list

objMessage.From = mfrom;
objMessage.Subject = txtSubject.Text;
objMessage.Body = txtBody.Text;
objMessage.Attachments.Add(attach);
objSmtpClient.Send(objMessage);