Mass emails

P

PokerMan

I need to email my client database of emails, but doing this is just too
slow:

...pseud code

while(have emails)
{
//fetch email
//preinitialised smtpclient object with host and message used
smtpclient.sendemail();
}

I have seen some complex codes written for mass emailing, why is the aboce
so slow and what are the issues with doing it this way? Could anyone point
me to the 'right' method? I already page my sql server via a stored proc to
bring back the data in 1000 record chunks.

I use asp.net 2 and c#

Thanks
 
B

Braulio Diez

Hello,

I had a similar issue long time ago using .net fx 1.1, the workaround that
I found was to send an e-mail for each ten persons (then if you have 1000
contacts you will only send 100 e-mails), that worked perfect for me, I'm not
sure if I had to workaround the thing of getting several persons in the "To"
field (I think that didn't happened).

Good Luck
Braulio

PS: More Info about SMTP and ASP .net

http://www.tipsdotnet.com/ArticleBlog.aspx?KWID=45&Area=SMTP&PageIndex=0


/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 
P

PokerMan

Thank you for the reply....

I have 8100 people at present so i page 1000 at a time into the datareader,
loop it and send. If i add 10 people to the email ata time i think it does
then put all 10 in the To field. Unless i use bcc? And make the to field a
dummy address? What would be your best advice here?

i will investigate this method tho, thanks...anyone else with any other
methods or tips?
 
B

Braulio Diez

Try the several to's approach I think it doesn't show all the To's in every
mail (at least I think it was that way on system.web.mail).

Tell me if the approach works, if not we have to find another workaround :)

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 
B

Barrie Wilson

PokerMan said:
Thank you for the reply....

I have 8100 people at present so i page 1000 at a time into the
datareader, loop it and send. If i add 10 people to the email ata time i
think it does then put all 10 in the To field. Unless i use bcc? And make
the to field a dummy address? What would be your best advice here?

i will investigate this method tho, thanks...anyone else with any other
methods or tips?

put the addresses in BCC unless you want all the recipients to know who else
got the email ... even if you don't care, it looks sloppy on the TO line and
may get spam-trapped if this is external mail

so how slow is "slow" ? could be you're ok and could be that BCC'ing and
the like is ducking the issue of figuring out a more efficient way to do the
job, which you may or may not care about ....
 
S

Scott Roberts

As another person asked, how slow is "slow"? We occasionally send about 3000
and it takes 30-45 minutes.

What exactly are you doing in "preinitialised smtpclient object with host
and message used"? More specifically, are you disconnecting and
re-connecting to the SMTP server every time? All you need to do is change
the "TO" line (and perhaps the message body, if desired) and send the new
email.

If all else fails, consider using a list service instead.

Scott


 
P

PokerMan

Yep thats exactly what i am doing.

By pre-init, as in host doesnt change, from doesnt change etc. So i just doa
smtpclient.send in aloop, and i am getting similar time frames, which to me
is quite poor? On the 8k ppl i geta time out and it runs for along time,
what about huge databases of 100k plus people, how do they do it? If 3k ppl
takes 30 minutes, thats 100 every minute, so a 100k ppl is 16hrs plus! There
must be a more efficient way surely? My database is growing rapidly and i am
worrying aboutt he scalability of my solution? Any ideas?

For now i will try the bcc and bulk them in so a load go with one smtp
client send and try and improve it that way.

Thanks in advance, i look forward to hearing other methods
 
B

Barrie Wilson

what about huge databases of 100k plus people, how do they do it? If 3k
ppl takes 30 minutes, thats 100 every minute, so a 100k ppl is 16hrs plus!
There must be a more efficient way surely? My database is growing rapidly
and i am worrying aboutt he scalability of my solution? Any ideas?

keep in mind: 100k is a pint-sized mailing list; these jerks who send out
millions of Viagra ads are probably physcially located next to the backbone,
buy a lot of bandwidth, use an industrial strength mail server built with
mass-mailing in mind, use multiple servers, etc etc ... there's more going
on than how good your C# code is ...

I think we know that any half-decent C# code can easily package up a LOT OF
EMAILS in a really short time; the limiting factor here is almost certainly
on the network ... unless your code is really, really bad ...
 
S

Scott Roberts

On the 8k ppl i geta time out and it runs for along time,
what about huge databases of 100k plus people, how do they do it? If 3k
ppl takes 30 minutes, thats 100 every minute, so a 100k ppl is 16hrs plus!
There must be a more efficient way surely? My database is growing rapidly
and i am worrying aboutt he scalability of my solution? Any ideas?

Is there a particular reason that time is a problem?

As I mentioned before, you might look into a list service. I'm guessing that
there is tighter integration with the mail server and speeds are much
better.
 
G

Guest

I need to email my client database of emails, but doing this is just too
slow:

..pseud code

while(have emails)
{
//fetch email
//preinitialised smtpclient object with host and message used
smtpclient.sendemail();

}

I have seen some complex codes written for mass emailing, why is the aboce
so slow and what are the issues with doing it this way? Could anyone point
me to the 'right' method? I already page my sql server via a stored proc to
bring back the data in 1000 record chunks.

I use asp.net 2 and c#

Thanks

Where the SMTP server is located, on the same server?
 
P

PokerMan

Well my site seems to time out which is why i want it shorter. I have it set
now not to time out but it still seems to eventually break when it runs too
long (into the hours). So i wnt it to run shorter if possible.
 
P

PokerMan

Yeah i think thats what it is, when i run it and comment out my smtpclient
send line, it processes my records liek lightening. Its when it has to
actually do the send, i get the slow down. So is there nothing i can do then
aside from bulk together the to's so that it has to do less individual
sends?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top