开发者

How to test sending multiple emails?

Well, I want to write an application (C#) to send many emails at one time. It could be a situation - that I need to send from one email server many different messages to many different people.

I'm not really sure, how to do that (so the soluti开发者_如何学Goon will be most effective) - but first I want to ask you, how to test that task. I mean.. I don't want to send spam to 1million unknown addresses.

I want to check - how long it will takes - Sending 1mln email messages from one server. Is that possible to make that test?

Thank you for your help.


You have a couple options:

  1. Setup your own mail server with many mailboxes and send the mail locally.
  2. Create a few free email accounts with free e-mail providers and spam them. Do know that if you go this route you will most likely trigger spam filters provided by the hosting server.


There are many different ways to test this.

a. Message Generation: You would need to test how long C# would take to generate those messages. This would depend on how efficiently you write your message generation code - whether you employ threading, caching, etc.

b. Message Submission: You would need to test how fast C# can submit those messages to the server. This would depend on the network bandwidth you have to the email server, as well as how powerful the server is and whether it can handle you sending email to it on multiple threads.

c. Message Delivery: This would test how long it takes for the message to reach the user. This would depend on the server, and is probably not something you can do unless you actually do it.

Hope this helps!


If you need to test the sending of email to many different email addresses, Post Hoc will act as an SMTP server and receive all the email. You do not need to set up any email account ahead of time, in fact there is no limitation at all on the email addresses used. All of the email is sequestered on your one host so there is chance of annoying a real person nor accidentally tripping any spam limits. The overhead for processing each message is extremely small, so you should see no performance problem, even when sending 10,000 email messages.

Open source at: Post Hoc GitHub Site

Also, check the blog post: PostHoc: Testing Applications that Send Email

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜