472,993 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 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 2209
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
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.