Super simple mail archiving solution
The Rails application for one of our clients sends numerous emails - to customers as well as to staff - on a daily basis, about purchases made, contact messages, alerts to investigate something, list of daily transactions, etc. Frequently there have been questions raised about whether an email was sent to someone and what exactly was in the email. And most of the time, we were at a dead-end as there was no way to search through those old emails.
I have been searching for a suitable solution for this problem for a few days/weeks now on a low priority basis. Explored some commercial mail archiving systems. And thought through the possibility of building a custom mail archiving functionality - either as part of the existing rails application or as a stand-alone system. Either option seemed unviable due to cost and time factors.
Hit upon the following simple solution for the problem:
bcc emails sent from the system to a new email address.
We created a throwaway gmail account for this purpose. With this in place, all the emails are being routed to one place, and when we need to find an old email, we just have to search in one gmail inbox.
The code change for this was a one liner:
Simple and effective solution to the problem we had on our hands!