Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1431
  • Last Modified:

Sending Email in Visual studio Can only send out 11 at a time!

After 11 emails I get the following error.

Insufficient system storage. The server response was: 4.1.0 Too many emails sent on this session

I read enough to know that this is a common error with the logic I am using, but most people comment the threshold is 100 emails.. 100 would be fine, as I have to send out about 83 - 90..
But my email list could grow.

So is there a different method I should be using? If not is there something I can do to get my threshold up to at least 100?

Below is the code I am using.
for (int idx = 0; idx < lstUnitInfo.Count; idx++)
        {
           mMailMessage = new MailMessage();
           // Set the sender address of the mail message
           mMailMessage.From = new MailAddress("wendavcs@comcast.net");
           string setSubject = "";
           try
            {
                sglUnitInfo = lstUnitInfo[idx];
                // Set the recepient address of the mail message
                setSubject = "Training Information for " + sglUnitInfo.UnitType +
                    " " + sglUnitInfo.UnitNo;
             
               
               mMailMessage.Subject = setSubject;

                //The To: recipient.. attach 
                if (NormalTest == "Test")
                    mMailMessage.To.Add(new MailAddress(testEmail));
                else
                {
                    for (int i = 0; i < 2; i++)
                    {
                        if (sglUnitInfo.Email[i] != null && sglUnitInfo.Email[i].IndexOf("@") != -1)
                            mMailMessage.To.Add(new MailAddress(sglUnitInfo.Email[i]));
                    }
                }


                SetAttachments();
                PrintBody();

                mMailMessage.Body = fullBody;


                // this is if through IIS
                //SmtpClient mSmtpClient = new SmtpClient("localhost");

                // Instantiate a new instance of SmtpClient
                SmtpClient mSmtpClient = new SmtpClient("smtp.comcast.net");


                // Send the mail message
                mSmtpClient.Send(mMailMessage);

                mMailMessage.To.Clear();
                mMailMessage.Attachments.Clear();
                mSmtpClient = null;
                UpdateTableDate(sglUnitInfo.UnitType, sglUnitInfo.UnitNo);

            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                if (attachmentmsg1 != null)
                {
                    attachmentmsg1.Dispose();
                    attachmentmsg2.Dispose();
                    attachmentmsg3.Dispose();
                    attachmentmsg4.Dispose();
                    attachmentmsg5.Dispose();
                    attachmentmsg6.Dispose();
                    if (mMailMessage != null)
                        mMailMessage.Dispose();
                    
                }
            }
        }

Open in new window

0
moosetracker
Asked:
moosetracker
  • 3
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
That's a limit by your ISP, Comcast.  It's not likely that they will change it for you.  Some ISPs set the limit at 25.  Yahoo on a paid account was setting it at 25 emails Per Day.  It's an anti-spam thing.

Bulk email services like Constant Contact have their own servers.  They also work with large email services like Gmail, Yahoo, and Hotmail to help get the emails delivered.  You could get your own web hosting and send out emails from there.  But if you send too many, they will shut you down too.
0
 
moosetrackerAuthor Commented:
Not what I was hoping to hear, but thanks. Seems I can have alot of contacts in one email, Just not many seprate emails.

I might try grouping Training annoucements together more for ones that are just general information.

Unfortunately If I am sending confidentail information I have to leave it at sending out individual unit per unit.

I set up to update a date field when the email is sent, then when it blows the next run will bypass the units that the date has been set to current date. But I have to run through about 7 abnoxious errors to get the emails completely out.

Seems like if coming out of the program and then going back in resets and lets me send out 11 more, there should be something that we could reset programmically.
0
 
Dave BaldwinFixer of ProblemsCommented:
No, you need to limit how many contacts in an email also.  When your email hits the server, it gets repeated as many times as there are contacts and that's what counts to your ISP.

You should be aware that ISPs like Comcast and AT&T and the email services like Gmail, Yahoo, and Hotmail are more concerned about limiting spam than delivering your email.  If you exceed their limits, they usually just cut you off.  That's why we keep recommending the services like Constant Contact.  Bulk email is their business.  Some of them are free also.
0
 
moosetrackerAuthor Commented:
Thanks I will look into that, Free is good as this is voluntery work, with no capital from a Buisness.

 Weird with my units some I have 1 contact others 2 or 3.. Doesn't matter if within the entire group I have sent out 11 emails or 33 in all.. It always cuts off at 11 seperate emails. Also my in-laws use the same service they are into passing everyone in the world jokes and stories. The list of email contacts they seem to throw into one email is outragous!
0
 
Dave BaldwinFixer of ProblemsCommented:
I know what you mean but I don't know how to explain that.  I just know that we get a lot of questions here about bulk email with the same problems over and over.  I can't recommend that you try it and see if you get lucky.  All I can do is tell you about the known problems and solutions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now