The algorithm needs training data. In this example you have a load of emails where you've explicitly tagged each one as either spam or ham.
So you could perhaps do what you're suggesting, if you have a big database of emails tagged as 'interesting' or 'not interesting'.