We have a website and we just ran into a problem when trying to send 700 emails in one bulk. I'm thinking it's better to send 100 emails 7 times but which approach should I take?
- I could just use a for loop and send an email 7 times but is there any problems with this approach, e.g. if the amount of emails double?
- Threading, which I'm new to and would take more time.
Here's my code:
protected void btnClick_Send(object sender, EventArgs e)
{
MailMessage mailObj = new MailMessage();
mailObj.Bcc.Add(txtReciever.Text.Trim());
mailObj.ReplyToList.Add("our-reply-email@oursite.com");
mailObj.SubjectEncoding = System.Text.Encoding.UTF8;
mailObj.BodyEncoding = System.Text.Encoding.UTF8;
mailObj.Subject = txtSubject.Text;
mailObj.Body += Environment.NewLine;
mailObj.Body = txtContent.Text;
mailObj.Body += Environment.NewLine;
SmtpClient SMTPServer = new SmtpClient();
SMTPServer.Send(mailObj);
}
Any other ideas?