Tinymail – unit testing and creating messages

Tinymail has integrated unit testing. I used the GUnit framework. I have to add more tests but a first test-suite for the message header type has already been added. There’s support for the Hildon framework in GUnit, so I guess this is good news for the Maemo guys. Some API docs about GUnit can be found here.

I also started working on making it possible to create messages with tinymail. Once this is done, I’ll add a transport that supports SMTP. Soon we’ll be sending our first simple messages using tinymail.

And once that is possible, I might start thinking about preparing a first release. After that first release I’m planning to introduce support for a few HTML widgets. If you want to be ahead of me and do this yourself already, take a look at the text buffer stream-type in libtinymail-gtk. You will basically have to create a stream for your HTML widget (MIME parts get streamed in the widgets). A difficulty will be displaying image mime parts if they are referenced by an IMG HTML tag in the HTML MIME part. I don’t know whether all HTML widgets support doing that without writing the parts to a /tmp or something (which might not be a good idea on a mobile device).

Tinymail will need to support multiple possible HTML widgets because mobile devices often come with specialized HTML widgets. So if you want me to accept such a patch, don’t even think about making a coupling mistake. You basically have to implement this interface and put all the device-specific code in a new target. I’m thinking about creating an interface for a mime-viewer so that I can decouple the msgview-type from the display-implementation (for example a specific HTML widget). Feel free to join me on damaging our brains on this one. Note that quick’n dirty or hackerty hack ideas are not what I’m interested in. Tinymail is (going to be) 3000% correct and clean.

Some people asked me to setup a mailing list. If somebody is interested in doing that, tell me. I really dislike this sort of “project management” tasks. Me personally, I’d like to focus on coding. Really. I do, however, accept patches and help from others. Oh, only a -devel mailing list would do. I’m not yet interested in what users think of tinymail. Tinymail is pure development at this moment.

2 thoughts on “Tinymail – unit testing and creating messages”

  1. Hi Philip,

    Displaying embedded images is quite easy, actually — the URLs will start with cid: and you can find the appropriate MIME-type. I wrote a MailViewer widget for that, it uses GMime + GtkHTML to do view ‘mhtml’ messages. gtkhml will emit a ‘url_requested’ signal, and you can then simply put the MIME-date in the GtkHTMLStream — no temp files required.

Comments are closed.