Željko Filipin's Blog on Software and Testing

Test like you do not need the money.

Archive for the ‘E-mail’ Category

Ruby Mail on CRuby, JRuby and IronRuby

with 4 comments

Today I tried Mikel Lindsaar’s Mail gem on CRuby, JRuby and IronRuby.

Installation of each Ruby version and Mail gem was really easy so I will not describe it here. What interested me was how fast was Mail on each Ruby implementation.

I have created a simple mail and saved it as 1.eml.

Date: Thu, 24 Dec 2009 14:37:34 Central European Standard Time
From: from@test.com
To: to@test.com
Message-ID: <4b336e9e762a0_a1014263a4689d3@2003-ie7.mail>
Subject: This is a test email
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII";
Content-Transfer-Encoding: 7bit

Some text for mail body

This script will read the file, display subject and time elapsed (in seconds).

time = Time.now
require "rubygems"
require "mail"
mail = Mail.read("1.eml")
puts mail.subject.to_s
puts Time.now - time

I have executed the script three times for each Ruby implementation. It looks to me that CRuby and JRuby are similar in speed, and IronRuby is way slower.

Test Run CRuby JRuby IronRuby
1 2.594 3.0 9.8125
2 2.109 2.016 7.796875
3 2.11 2.0 7.6875

Environment

Tests were run in VMware Fusion 2.0.6 virtual machine, 512 MB RAM, Microsoft Windows Sever 2003 R2 (Standard Edition, Service pack 2).
Host machine is MacBook Pro, 2.4 GHz Intel Core 2 Duo, Mac OS X 10.6.2, 4 GB RAM.

>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

>jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) Client VM 1.6.0_10) [x86-java]

>ir -v
IronRuby 0.9.3.0 on .NET 2.0.0.0

Mail version 1.3.4 on all platforms.

Written by Željko Filipin

December 24th, 2009 at 5:01 pm

Posted in E-mail,Ruby

Tagged with

TMail 1.1.0 Gem Released

without comments

stamp-sm.jpg

I have been using TMail for testing e-mail functionality of web application that I test for a long time. But, development of that library stopped at 2004. Today I found out that it is again in development. Take a look at it’s web site and RubyForge project site.

Written by Željko Filipin

October 31st, 2007 at 9:00 am

Posted in E-mail,Ruby

Troubleshooting SMTP Issues with Telnet

without comments

I have really bad memory. I have to write this down. I just know I will forget it, but need it later.

I had to find out why one user did not receive any mail from us. I tried the usual things, but all looked fine. My developer suggested to troubleshoot it with telnet. I found good article about troubleshooting SMTP issues. What I did:

  • open command prompt
  • find server
    >nslookup -querytype=MX [domain]
    ...
    Non-authoritative answer:
    [domain] MX preference = [integer], mail exchanger = [subdomain].[domain]
    ...
  • connect to that machine with telnet
    >telnet [subdomain].[domain] 25
  • good
    220 SMTP Proxy Server Ready
  • not so good
    554 Transaction Failed Listed in connection control deny list

Written by Željko Filipin

October 15th, 2007 at 9:00 am

Posted in E-mail