Massive mail application in PHP

Since we have to to send e-mail notifications every now and then, I developed a small PHP page to build the e-mail and send it to all recipients individually, I mean, in a way that the To field doesn’t contain a huge list of e-mail addresses (doing that can be even illegal due to personal data protection laws, and is very ugly too ;)). The application grew and it currently does quite a bit of things, so I think it’s worth uploading its sources here.

What it does:

  • Sends mail individually, so each recipient doesn’t know the addresses of the other ones.
  • Parses the text in the To text entry, extracting only e-mail addresses.
  • Sends mail with plain text or HTML.
  • Can attach files.
  • Can attach an image in the body of the e-mail.

What it doesn’t do (because I didn’t care when I wrote it :P):

  • It doesn’t support concurrency; if two people use the application at once, the attached files are mixed.
  • The attached files aren’t deleted automatically after sending the e-mail, but there’s a button to do it manually.
  • The on-screen texts are only in Spanish, and they aren’t i18n-able.

Download the files: Massive mail application in PHP.

PS: I forgot! You’ll need the library PHP Mailer. Download and install it in your web server together with this application.

A javascript calendar in your eZ Publish page

If you maintain a web site built on eZ Publish 3.x, maybe you miss having a calendar on your side bar, where you could mark special events on. Or at least, I did, so I searched a bit and read that a calendar was included in ezwebin, the new design that comes with eZ Publish 3.9. Unfortunately, its integration in an older eZ site looked like pain for me, but I found an alternative, a contribution called ezAgenda. It features a datatype to store events, and some templates to build a calendar and show events over it.

ezAgenda screenshot

I took its code and adapted it to my needs. In particular, I wanted the calendar to be integrated in a side bar, and show the name of the events in a pop-up when the mouse is over it. Something like this:

JS calendar screenshot

There are some other changes and improvements, which are explained in the readme file. You will also find there the installation instructions (basically, you have to place the files, create the datatype and add the overrides to activate the templates).

Download the files: agenda.tar

Plugins for WordPress-MU: ‘List all’ and ‘Recent Posts’

WordPress-MU is an official modification for WordPress able to manage multiple blogs with a single installation. I have used it to set up a platform for school newspapers, supported by the Council of Coruña.

I use the main page of the system as a summary of all the newspapers, showing the active blogs and the latest news produced on them. For that subject I found two useful plugins: List all and Most recent posts. As their name states, the first one lists the public blogs of the system and the second one extracts the latest news.

I needed a more complex behavior from them, so I made some modifications. Basically, I replaced the two parameters that wrapped the list with a format string as used in printf-like functions. Now the user can control all the content inside the list item, not only the beginning and the end.

Here are the files. Hope they’re useful for someone!