Rachelle Gardner is an agent from Colorado, and posted an article on how to write a query letter. She breaks her advice down into a list, and although it applies specifically to longer pieces of writing (eg. novels), it's still a worthwhile read. Remember that there are some markets that won't accept a submission without querying first.
This is a LETTER, not a book synopsis dropping into my inbox out of the sky. You are writing to an actual person. So it’s best if the query is addressed to the recipient by name, and it should not only give your pitch and your personal information, it should be structured as a letter.
(On a side note, Literarium supports queries and markets/services that require a query first. Just one extra step in making it easier to manage your submission load.)
Read the article here: http://www.rachellegardner.com/2011/08/how-to-write-a-query-letter/