Click here to Skip to main content
16,021,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am getting this inner exception when i am trying to send email to 110 recipient......

and exception is Unable to send to a recipient.
here is the code...

C#
public void send()
    {        
        try
        {
            LoademailID();
            MailMessage message = new MailMessage();
            message.To.Add(emailID.TrimEnd(',')); // emailID is string type variable holding 110 email records from DB
           
            message.Subject = "Testing Email Send";
            message.From = new System.Net.Mail.MailAddress("emailID");
            message.Body = "TextMessage";
            System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();
            smtp.Host = "smtp.gmail.com";
            smtp.Port = 587;
            smtp.EnableSsl = true;
            smtp.Credentials = new System.Net.NetworkCredential("UserName", "Password");
            smtp.Send(message);
            Label1.Visible = true;
            Label1.Text = "Mail Send Successfully";
        }
        
        catch (SmtpFailedRecipientsException ex)
        {
            Label1.Visible = true;
            Label1.Text = ex.FailedRecipient;
        }
    }



any idea pls help...


Thank you...
Posted
Comments
Herman<T>.Instance 22-Jul-13 8:34am    
try smaller batches (per 25 or so)
Anjanee Kumar Singh 22-Jul-13 8:38am    
smaller is running good....i just want to know if i send more than 100 Recipient will it go in inbox or in spam..any idea

thank you

1 solution

Refer this link

How do I correct error message:4.5.3. Too many recipients?[^]

It states that:
Quote:
The easiest way to prevent this message from popping up is to create distribution lists with a reasonable amount of e-mail addresses,less than 25 recipients if possible, although your server may allow between 50 - 75 recipients on each list. You can find out the limits for sending e-mails by contacting the mail administrator or your ISP. By saving a number of distribution lists with less than this number of contacts, you should avoid receiving this error message the next time you send mass emails.
Regards..:laugh:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900