Monthly Archives: January 2011

ActionMailer.Net: Email Templates for the MVC Crowd

Over the past few days I’ve been working on an application here at work that will be sending emails pretty heavily.  Up until now, my usual plan was to just write a couple of helper methods that I could call.  These helper methods would undoubtedly use StringBuilder to do most of the grunt work, happily formatting my emails.  The problem with this approach, however, should be obvious.  There are tons of templates hard coded in C# with string literals all over the place… YUCK!

So I took a step back.  I realized that the Rails framework really has this nailed.  Through the awesome ActionMailer library within Rails, you can use the built-in template engines to generate emails almost exactly like you would generate a view.  This leads to very small helper methods, and it’s just so darn clean.  I think the MVC community could use a cool library like this, so I decided to write one.

Continue reading

Oh Noes! There Goes My Blog!

So in case you are wondering… recently I was moving my database around, and in the midst of things I managed to completely blow up my WordPress database. I thought to myself: “No matter! I have backups!” Little did I know that I had actually forgotten to set up the cron job to copy the backups to AWS S3 (my backup solution du ‘jour).

Long story short, I had to scrape my content out of Google cache to get this blog back in action. One lovely side effect, however, is that all my post comments were blasted to smithereens. I do apologize for those of you that were thoughtful enough to lend me your words. I’ve learned the hard way to always confirm your backup strategy. I hereby join the ranks of Phil Haack and Jeff Atwood (*facepalm*).