Wojtek Szutnik


My friends joke that I was born with my hands on the keyboard, but apart from spending my time in front of the computer, I also enjoy playing soccer and listening to good music. In my time, I won GHOP, a Google contest with the worst-sounding name ever. While I have completed some university-level CS courses in high school and my early academic times , I decided to drop Computer Science and started working on my startup project, called Apocalypse Online, which turned out to be the best decision of my life so far 🙂 This browser based game written in Django is my beloved child to which I devoted almost two years now.

Last year I participated in GSoC for WordPress as well, and completed the Full Throttle Trac Annihilation Project. I also made a small contribution as a Google Code-In mentor.

Feel free to visit my website or twitter.

Project Description:

The notification emails are a rare case where WordPress is behind the times – there is a bunch of plugins allowing to send HTML emails, but it definitely should be a core feature. My goal is to create a solution which will:

a) incorporate HTML emails to WordPress

b) work on email clients without HTML support, all mobile devices, iPads, iPods, and all other iDevices

The project consists of:

a) designing the e-mail prototypes after getting community feedback about the possible features like action links inside
b) implementing a solution working on all types of web/desktop mail clients and devices
c) introducing a customizable wrapper for emails, allowing users to customize notifications via plugins or just filters
d) testing: making sure all text is clear and visible on various mobile devices, that using the emails on a multitouch device is a pleasant experience, readable information for non-HTML clients.

an alpha version of the emails will be available on July 1. A significant part of the project is testing the solution on various devices and in the end, providing a detailed report and polishing the user experience for all use cases

The first part of the schedule, between now and may 23 will consist mostly of getting community feedback concerning my idea and evaluating the existing plugins. For now, there are a few existing plugins, allowing to send HTML e-mails from WordPress: HTML E-mails , which generates very nice results such as:

Other existing solutions are the News Mailer , Subscribe2 and Mailpress. The first design sketches prepared in May will be informative and are meant for discussing specific implementation details, such as the presence of specific action links in the e-mails (see the image above as an example), and also are meant to determine specific styling details, such as number of header types, number of sections in the e-mails etc (by sections I mean the “user info”, “message content”, “header”, “action links/buttons”, “WP page info” parts.

The prototyping period which is until june 5 is meant to provide ready-to-use e-mail templates and HTML/CSS code to use in WordPress. In the same time, I will be modding the core features to meet the requirements of action links and customizability of the e-mail sections. The latter is not likely to be an extensive task, as most of the desired actions are already there in the plain text e-mails as well. A starting point for coding the mailing part itself will be the wp_mail function located at pluggable.php#271.

Recently Ryan McCue patched wp_mail() so that the user could easily send multipart emails with an array as the body parameter. It is as simple as specifying correct value for keys of ‘text/plain’ and ‘text/html’. This refers to ticket #15448 and the related patch.

It is worth noting, that currently WP is using the open source PHP Mailer class written by Andy Prevost and Brent R. Matzelle. The first step is making use of features existing in this class – it has very basic HTML support, but it’s better than nothing. One of the goals of the project is creating a wrapper, which will take care of the HTML mailing – a piece of code “between” wp_mail and PHPMailer itself. The wrapper will allow the developers to mod html sending features, and the users – to easily customize their experience. The developers will be able to extend the html mailing by using filters and plugins. An optional element of the project (depends on the community input, I got some positive reviews of this idea so far but it needs further investigation due to its complexity) is to provide an element in the admin panel, which would allow users to specify basic features from the UI side – styling, the ability to turn on/off html emails etc.

The IRC discussion on 06.04 brought the conclusion, that email themes should be linked with “overall” site themes. The file structure will be consistent with the current Template Hierarchy: the idea is to have a generic email.php file used for notifications. If a specific email-{actionname}.php file exists, it has priority over the generic theme file.

Another optional idea is including a tag with a tutorial in the “welcome” email sent to the blog admin. Thanks to html5 it is possible to easily embed videos in emails and it would be a nice way to introduce WordPress to new developers.

An important part of the last period, which is due to august 22, is testing and bugfixing. The goal of the project is to implement high quality code which will make it to the WordPress core. This means a lot of testing to ensure usability, readability and accessibility. I will be performing mobile and desktop tests, as well as fixing and improving the already implemented functionalities. Also, it will be a great time for extending the wrapper customization features – there may be some community requests and if I manage to finish all my scheduled task early, this will be the way to go…

Project Schedule:

April 25 – May 8

GSoC begins. Community bonding period not needed, so the prep/design work begins now.

Discussing ideas with other developers on IRC (themes for specific actions, presence of specific action links, additional customization features for emails, admin panel options for enhanced emails). Evaluating existing plugins similiar to the project topic – maybe there are some details worth attention or usability issues to think about.

May 9 – May 15

Design work: planning features for every e-mail type (currently WordPress has about 5 notification types, + we need at least one generic type)

May 16 – May 22

Prototyping: first CSS+HTML templates based on the design.

May 23 – June 1

Preparing the template hierarchy system for email themes, linking it to the current themes system (in other words, making email-{actionname}.php work.
Beginning the implementation of the generic theme file.

June 2 – June 8

Implementing the generic theme file (email.php)
Preparation work for child action-dependant files.
Also, there might be a need for two generic theme files – one for the emails going to simple users, and the other one for the admins. Another possibility is to prepare the admin theme as a child theme for the generic theme file, being the parent for action-dependant at the same time.

June 9 – June 19

Implementing two child action-dependant files (admin-related, if there will be a difference between the action-specific files I will go for the administration emails first)

June 20 – June 26

Implementing two child action-dependant files (user-related, see above)


Time buffer for improving the theme handler and specific theme files.
Adding management features to the admin panel

July 9 – July 17.

AFK. Moving to new apartament, scheduled vacation. +-48 hours depending on the aparment thing. We have the enhanced emails working by now and it is the ideal time for community testing.

July 18. – July 24.

Fixing bugs (if present)
Improving code documentation
Mobile device testing (this one is the most likely to cause problems from all test suites, so let’s have it as soon as possible).

July 25. – July 31.

Fixing bugs (if present)
Desktop and browser email clients testing
If needed, time for more mobile device testing

August 1. – August 7.

Testing, testing, testing – both admin area and the emails themselves, assuring about all features working properly, developing a simple alternative theme and testing multiple-theme administration/selection/configuration.
Code quality assurance – I am very determined for this project to make it to the core. Every single line will be examined and polished to become part of the project core.

August 8. – August 14.

Even more testing. By this time there will be no known bugs or flaws in the code. If time allows and there are some additional community requests, I will be implementing them. Also, again, code quality assurance, extending the documentation to the maximum level, optimizing every possible part of the project.

August 15. – August 21. FINAL EVALUATION

All the work should be done long time before now, polishing the code and the documentation, again assuring about the code quality. Creating a tutorial for theme designers.

Project mentors:

Aaron D. Campbell, Justin Shreve