G
Guest
I have the function which consists code below. Every 50 mails the memory of
application raises up 100k. Sometimes is more. Does someone know why and what
I have to do to solve this problem.
for(int emailNum = 0; emailNum < int.Parse(txtMailsAmount.Text); emailNum++)
{
MailMessage tmp = new MailMessage();
SmtpMail.SmtpServer = mail.SmtpServer;
tmp.BodyFormat = mail.BodyFormat;
tmp.Body = mail.Body;
tmp.Subject = mail.Subject;
tmp.From = mail.From;
tmp.To = mail.To;
tmp.Cc = mail.Cc;
SmtpMail.Send(tmp);
}
application raises up 100k. Sometimes is more. Does someone know why and what
I have to do to solve this problem.
for(int emailNum = 0; emailNum < int.Parse(txtMailsAmount.Text); emailNum++)
{
MailMessage tmp = new MailMessage();
SmtpMail.SmtpServer = mail.SmtpServer;
tmp.BodyFormat = mail.BodyFormat;
tmp.Body = mail.Body;
tmp.Subject = mail.Subject;
tmp.From = mail.From;
tmp.To = mail.To;
tmp.Cc = mail.Cc;
SmtpMail.Send(tmp);
}