473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SMTPMail.Send(MailMessage) - deliberately slow?

Have Our Friends in Redmond put delay loops into the
SMTPMail.Send() method, or does it /really/ take almost a second
to send a mail message?

I've written a windows service that send emails. It was originally
intended for /small/ volume, direct communication with our clients.
Somebody, however, has decided they want to send a message to
the entire client-list - nearly 200,000 entries - and, at our current
throughput, this will take us several *days* to send (we're /peaking/
at around 60 message a /minute/ at the moment. We've tracked the
bottleneck down to the SMTPMail.Send( MailMessage ) method and,
monitoring the SMTP Server at the "other end", it looks as though the
Framework class is opening and closing a "connection" to the server for
each and every message, which is slowing things down tremendously.
(The SMTP Server is happily dealing with the actual send requests at
a rate equivalent to 10 message a second, if we could monopolise it).

So, are there any properties in the SMTPMail namespace (or /anything/
else that we could configure to improve our throughput, or am I going
to have to resort to using raw sockets and bounce through the SMTP
protocol myself?

TIA,
Phill W.
Nov 20 '05 #1
1 2229
www.vbip.com

Phill. W wrote:
Have Our Friends in Redmond put delay loops into the
SMTPMail.Send() method, or does it /really/ take almost a second
to send a mail message?

I've written a windows service that send emails. It was originally
intended for /small/ volume, direct communication with our clients.
Somebody, however, has decided they want to send a message to
the entire client-list - nearly 200,000 entries - and, at our current
throughput, this will take us several *days* to send (we're /peaking/
at around 60 message a /minute/ at the moment. We've tracked the
bottleneck down to the SMTPMail.Send( MailMessage ) method and,
monitoring the SMTP Server at the "other end", it looks as though the
Framework class is opening and closing a "connection" to the server for
each and every message, which is slowing things down tremendously.
(The SMTP Server is happily dealing with the actual send requests at
a rate equivalent to 10 message a second, if we could monopolise it).

So, are there any properties in the SMTPMail namespace (or /anything/
else that we could configure to improve our throughput, or am I going
to have to resort to using raw sockets and bounce through the SMTP
protocol myself?

TIA,
Phill W.


Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jason | last post by:
Hi just a really quick simple question. Can you configure SmtpMail class in C# to use a different port? or does it have to be port 25? Thanks Jason
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
0
by: Stewart | last post by:
Hi, I have a program which needs to send individual (customized) emails to a few thousand recipients. Using the standard approach SmtpMail/MailMessage method and Win 2000 server (SMTP service...
5
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. ...
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
1
by: Michael | last post by:
Hello, I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
2
by: kmbarz | last post by:
I'm trying to expand my horizons here by working through an ASP.Net book. When I do the example that uses: Line 55: Mail.From = "feedback@graymad.com" Line 56: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.