Outlook Could Have Done Better!

February 18, 2010 | By Rakhitha | Filed in: Tech.

I have used MS Outlook 2007 for some time now. And I had no complains until I try to send a large attachment through it. It was too large to send in one mail because GMail has 25Mb attachment limit. I break it up to 20Mb files using winzip and sent in number of mails. Outlook was sending out the mail at less than 10kbps speed. This is too slow even for my slow internet connection.

My internet connection is a bit of slow side. I am using a Dialog wireless broadband connection. Where I live, signal strength is pretty low. I can still manage a bandwidth of 20-120kbps with it depending on weather and time of the day. But round trip time is pretty high. That affect the effective bandwidth that you can reach with a single TCP connection. Download managers handle this problem pretty well by using multiple TCP connection to download the same file.

Obviously, Outlook uses only one SMTP session per mail account when sending all the mail. If your RTT is high, that is not a good thing. If all you have to send is just one e-mail there is no other option. But what if the user trying to send a number of mails each having a large attachment? Can’t we send them in parallel using multiple SMTP sessions?. Will that improve bandwidth use when RTT is high?

Well! I was in the mood to write some code and find it out. Actually that was the only option I was left with after Outlook gave an error after transmitting my mails over 8 hours at less than 10kbps. I have to send them all over again.

This is what I did

My setup has a file structure three levels deep. At the top-level there is a configuration file which has address to the SMTP server ( I used GMail) and authentication info. Next level each directory represents a separate e-mail that need to be send. There is a configuration file is each of those directories. It specifies To, Cc, Bcc, Subject and Body fields of the mail. Third level directory has the attachments that I want to send with the mail.

I wrote a program which reads above structure and send out mails using JavaMail through Gmail SMTP server. When the attachments given for a mail exceeds Gmail attachment limit, it automatically break it in to multiple mails. I used 5 threads to send the mails. I did not do a thorough performance analysis but the results were impressive. In average it consumed about 30 – 40 kbps of uplink bandwidth. That is three times more bandwidth utilisation than Outlook. And it took only around two hours to send the mails (Plus few more hours to write and debug the code). Outlook could not send them even after 8 hours.

All that lead me to think why don’t Outlook don’t do this? Is there something that I am missing?
If you are interested here is the code. You will need to add JavaMail API and Java Activation Framework API to the classpath before compiling this.

/Rakhitha


Tags: , , , , ,

One comment on “Outlook Could Have Done Better!

  1. […] After resizing the images, they are often small enough to mail using the Facebook mobile upload feature. If I have a large number of photos to send I use parallel mail sender that I posted about sometimes back. […]