I do a lot of work involving PHP-based web development. I often find myself needing to test e-mail functionality of a complex PHP application (such as Drupal), but I want to be sure that emails won't be sent to any of the unsuspecting users in the database of the application I'm testing.

Do accomplish this, I make a small but important change to my php.ini (actually in my conf.d/dev_mail.ini -- but it's the same thing):

sendmail_path="/usr/sbin/sendmail -i user@host.tld"

This tells PHP to use this command line whenever the mail() function is used to send an email. PHP's default here is "sendmail -i -t". The -t tells sendmail to scan the message text for To:, Cc:, and Bcc: headers to determine where to deliver the mail. By eliminating the -t we tell sendmail to use the email address(es) on the command line to determine delivery, thus making sure that no matter what PHP's mail() tells sendmail, it will deliver to the address you want.

This past weekend, for a number of reasons I won't get into now, I performed a complete "re-install" of my primary workstation. Previously, I was using XP Pro SP2, which had been installed and running smoothly on the machine for nearly two solid years. This also meant that my machine had two years worth of my customized configurations, applications, tools, etc., so a re-install also meant bringing a fresh Windows (Vista this time) installation up to speed and in sync with my preferences.

During the process of re-installing all the various programs and utilities that I make regular use of, it occurred to me that I was installing the things that I just couldn't do without -- the tools I keep in my toolbelt at all times. I don't know if I've got everything installed yet, but I know I've installed all the primary tools that I use on a regular basis... and they are listed here: