How to automatically create mailings from an RSS feed
Afaik there is nothing that does this out of the box. We are however working on two extensions that could accomplish this:

Newsstore - grabs content from sources like RSS and provides them as "items" in CiviCRM via the API

Newsstoremailer - uses those items to send out mailings automatically

Both extensions are still under development and even when finished you will probably need some additional custom code like this to make it work.

However, it is probably worth to take look at them as the topic is rather complex and you could avoid doing duplicate work. If you want to discuss details or a cooperation you may want to get in touch with Rich Lott from Artfulrobot who currently has the lead in the development.