2

I have a c# application that sends an email out to all employees in my database (not XPmail.)

I have over 300 employees and I was told it is a little slow. IS there anyway I can test the speed of CC'ing 300 employees and sending it out? I cant time stamp each email since its all carbon copied after the read loop in the database.

Mat
  • 202,337
  • 40
  • 393
  • 406
tdjfdjdj
  • 2,391
  • 13
  • 44
  • 71
  • What are you using to send the emails? Are you using a local smtp server? – marto Jun 06 '11 at 19:51
  • Yes. The companies local SMTP server. – tdjfdjdj Jun 06 '11 at 19:53
  • Does the problem itself have anything to do with SQL? If not, then the tag is unnecessary. If you are thinking of using a SQL email extension then you should replace the sql tag with the tag for your specific RDBMS – Tom H Jun 06 '11 at 19:55
  • I dont quite follow your question. In the past I used a .NET class to send emails. This was done 1 email at a time to handle exceptions related to bad addresses and the like. It sounds like you are doing a bulk send which could easily result in bulk failures. You should switch to 1 email at a time for this reason and this is also trivial to measure performance with start/stop timers. Otherwise, if you stick with just 1 email the best you can do is benchmark the SMTP server to try and increase performance. That question belongs on serverfault.com – P.Brian.Mackey Jun 06 '11 at 19:55

2 Answers2

6

The first thing to check is whether you're sending 300 e-mails to 1 person each or 1 e-mail bcc'd (not to or cc'd, bcc'd) to 300 people. If the former, you really should do the latter. Even better, you should have a distribution list set up on your server for this.

Regardless, the problem is almost certainly at your e-mail (smtp) server. There won't be anything you can change in your code to make it faster, and using a different language or platform won't help — it's all up to the smtp server and the bandwidth available.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • definitely a better approach with the "distribution list" (or lists) as long as the email itself is the same content per person and not specific to each person (or group of people) – DRapp Jun 06 '11 at 19:59
0

Sending a single email with many CC's or BCC's is exactly that - a single email. From that point, it's up to the mail server to dispatch the individual messages. Although you likely have little control over the mail software itself, it should always be faster than queuing up 300 individual messages.

Taylor Gerring
  • 1,825
  • 1
  • 12
  • 17