Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bulk Email problem
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Bulk Email problem
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01373136
Message ID:
01373136
Vues:
61
Hi All, I'm trying to send a monthly newsletter by email to a local club I'm a member of, we are about fifty in number, in testing I decided to send it to myself fifty times, the problem I'm having is the mail server chokes on iteration 25 - the error being: Too many messages, I've tried inserting a Sleep(1000) but it doesn't help- any ideas ? this is the main guts of the prog
for (i = 1; i < 1000; i++)
                {

                    client = new SmtpClient();
                    client.Host = MailServer;
                    client.Timeout = 50000;

                    from = new MailAddress(MailSender);
                    to = new MailAddress(MailRecipient);

                    message = new MailMessage(from, to);

                    


                    StringBuilder messagetext = new StringBuilder();

                    messagetext.AppendFormat("This is message # {0}", i);


                    message = new MailMessage(from, to);

                    message.Subject = "Testing bulk email";
                    
                    message.Body = messagetext.ToString();

                    client.Send(message);
               }
Regards,
Peter J. Kane



Pete
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform