Click here to Skip to main content
Click here to Skip to main content

MultiMail 2.0 - Freeware SMTP stress testing tool

By , 3 Oct 2003
 

About MultiMail 2.0

MultiMail 2.0 is a multi-threaded SMTP stress testing program which also doubles up as a handy tool for anti-Spam software development. It starts multiple threads, each sending a large number of mails in parallel to a specified SMTP server. MultiMail 2.0 is  freeware and can be used by anyone without the author's explicit permission.

How it came about?

Version 1.0

I wrote the first version while I was developing my own anti-Spam program Pop 3 Protector (discontinued). I used it to bombard test POP accounts with a large amount of email from multiple fake email addresses and with multiple subject headers.

A few months ago [here the current time is Feb 2002], I was asked to try out three different Linux based SMTP servers and decide on the fastest one. That's when I got a chance to use this tool once again. I sent huge amounts of mail through each server and recorded connection and mail delivery speeds. To increase the load I made the program multi-threaded. The user can set the number of threads to use. In this particular version I have restricted this number to 10, to prevent malicious people from misusing this program. But for anyone who wants to use this as an SMTP stress tester, 10 threads running in parallel, each thread sending 1000 mails each, should be quite good enough.

Actually there is a sneaky way to over-ride the restrictions, which is by running multiple instances of the program. But for some strange reason I have noticed that this will considerably slow down the user's machine and I hope that will deter people from trying it out.

Version 2.0

Version 2.0 uses the ATL7 SMTP and MIME classes and so I have removed all my Winsock-SMTP-chat code from the program. This has enabled me to add support for attachments which is quite handy.

Sending mail using the ATL7 classes

  • Include the required header file
  • #include <atlsmtpconnection.h>
  • Call CoInitialize
  • CoInitialize(0);
  • And write code similar to below snippet
  • CMimeMessage msg;
    
    msg.SetSender(strSender);
    msg.AddRecipient(strRecepient);
    
    //Optional
    msg.SetSubject(strSubject);
    msg.AddText(strBody);
    msg.AttachFile(strAttachFile);
    
    CSMTPConnection conn;
    conn.Connect(server);
    BOOL bSuccess = conn.SendMessage(msg);
    conn.Disconnect();
  • Call CoUninitialize
  • CoUninitialize();

History

  • v1.0 - 22 Feb 2002
  • v2.0 - 05 Oct 2003

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Nish Sivakumar
United States United States
Member
Nish is a real nice guy who has been writing code since 1990 when he first got his hands on an 8088 with 640 KB RAM. Originally from sunny Trivandrum in India, he has been living in various places over the past few years and often thinks it’s time he settled down somewhere.
 
Nish has been a Microsoft Visual C++ MVP since October, 2002 - awfully nice of Microsoft, he thinks. He maintains an MVP tips and tricks web site - www.voidnish.com where you can find a consolidated list of his articles, writings and ideas on VC++, MFC, .NET and C++/CLI. Oh, and you might want to check out his blog on C++/CLI, MFC, .NET and a lot of other stuff - blog.voidnish.com.
 
Nish loves reading Science Fiction, P G Wodehouse and Agatha Christie, and also fancies himself to be a decent writer of sorts. He has authored a romantic comedy Summer Love and Some more Cricket as well as a programming book – Extending MFC applications with the .NET Framework.
 
Nish's latest book C++/CLI in Action published by Manning Publications is now available for purchase. You can read more about the book on his blog.
 
Despite his wife's attempts to get him into cooking, his best effort so far has been a badly done omelette. Some day, he hopes to be a good cook, and to cook a tasty dinner for his wife.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberMember 826594610 Jun '12 - 14:27 
QuestionBig thatksmemberMember 46055868 Mar '12 - 4:01 
QuestionSource codememberjnks20054 Sep '07 - 6:28 
Questionregarding the number of connections establishedmemberlp19823 Sep '07 - 0:15 
GeneralBig Problem.... with attachmentsmemberdboychuk695 Jan '07 - 9:25 
GeneralRe: Big Problem.... with attachmentsmemberyhaker25 May '10 - 22:34 
GeneralHi Nish - Help Neededmemberaseef25 Sep '06 - 5:45 
Generaltwice amount mail..memberDaisuke Ota16 Jun '06 - 20:51 
GeneralI have problem with MultiMail 2.omemberMalathi Ranjit Singh22 Jan '06 - 22:15 
GeneralATL CSMTPConnection - Buggymemberjeff66614 Nov '05 - 3:14 
GeneralFound a bug with attachment handlingmemberchris_blandford30 Oct '05 - 3:29 
GeneralNot sending attachmentsmemberjbrown0123 Nov '03 - 15:28 
QuestionOld version still availibe?memberfaj28 Oct '03 - 2:23 
GeneralEnhancement for next VersionmemberFrank Carius15 Oct '03 - 1:23 
GeneralMany other usesmemberGerard Nicol5 Oct '03 - 7:21 
GeneralRe: Many other usesstaffNishant S5 Oct '03 - 7:34 
GeneralRe: Many other usesmember| Muhammad Waqas Butt |11 Sep '07 - 21:36 
GeneralNo support for smtp authentication - intendedstaffNishant S4 Oct '03 - 9:23 
GeneralPeople who downloaded it before 26th FebmemberNish [BusterBoy]26 Feb '02 - 12:37 
GeneralThanksmemberJames Pullicino26 Feb '02 - 2:58 
GeneralRe: ThanksmemberNish [BusterBoy]26 Feb '02 - 12:36 
GeneralRe: ThanksmemberJames Pullicino26 Feb '02 - 21:14 
GeneralVolunteers required urgently!!!memberNish [BusterBoy]24 Feb '02 - 0:25 
Can a few people kindly volunteer to test out the tool.
Not the zip here.
But a new one I'd like to have tested out thoroughly before I update the article.
After Anders Molin has made me aware of a problem with mail.nimo.dk, I realized that I was doing one recv() too many. But I didnt get a problem with any of the Linux servers as the greeting string was long enough so that two recv()s were called early. I assume that must have been the cause of error. Now what happened was that suddenly after DATA was sent, a recv() is coming extra which means the socket blocks endlessly. Thus Anders was right about never sniffing out the \r\n.\r\n, but not for the reasons he assumed. It wasn't that they were never sent, but rather, a recv() was blocking endlessly.
 
Thanks Nish
 
p.s. volunteers, reply immediately.....
 
My most recent CP article :-

A newbie's elementary guide to spawning processes

www.busterboy.org
GeneralRe: Volunteers required urgently!!!memberAnders Molin24 Feb '02 - 0:45 
GeneralRe: Volunteers required urgently!!!memberNish [BusterBoy]24 Feb '02 - 5:18 
GeneralRe: Volunteers required urgently!!!memberAnders Molin24 Feb '02 - 0:48 
GeneralRe: Volunteers required urgently!!!memberNish [BusterBoy]24 Feb '02 - 1:34 
GeneralHmmm, buggy, and uselessmemberAnders Molin23 Feb '02 - 5:06 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]23 Feb '02 - 15:43 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin23 Feb '02 - 23:26 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]24 Feb '02 - 0:09 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin24 Feb '02 - 0:39 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]24 Feb '02 - 1:31 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin23 Feb '02 - 23:34 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]24 Feb '02 - 0:01 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin24 Feb '02 - 0:41 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]24 Feb '02 - 1:29 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]23 Feb '02 - 15:50 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin23 Feb '02 - 23:27 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]23 Feb '02 - 23:59 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin24 Feb '02 - 0:43 
GeneralRe: Hmmm, buggy, and uselessmemberNish [BusterBoy]24 Feb '02 - 1:27 
GeneralRe: Hmmm, buggy, and uselessmemberAnders Molin24 Feb '02 - 7:53 
GeneralHmm..memberAmanjit Gill22 Feb '02 - 13:27 
GeneralRe: Hmm..memberNish [BusterBoy]22 Feb '02 - 19:43 
GeneralRe: Hmm..memberMustafa Demirhan22 Feb '02 - 22:46 
GeneralRe: Hmm..memberNish [BusterBoy]23 Feb '02 - 15:55 
GeneralRe: Hmm..memberJason Hooper23 Feb '02 - 0:41 
GeneralRe: Hmm..memberNish [BusterBoy]23 Feb '02 - 15:57 
GeneralRe: Hmm..memberJason Hooper24 Feb '02 - 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 4 Oct 2003
Article Copyright 2002 by Nish Sivakumar
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid