With physical submissions, it was always customary to include a cover letter with the work being submitting either to an anthology, or a magazine—with books and letters to publishers and agents it was an entirely different story with queries, and sample chapters and all that. But in recent times we've received a lot of queries about what an email cover letter to an anthology or a magazine should look like.
The basic email cover letter should come in a few parts:
The Greeting: don't start off with “Dear Editor” or “To Whom it May Concern” unless the publisher did not include specific information of editors on the call for submissions. Most times somewhere on the website/flier or call for submissions the editor of the anthology or magazine will list their name—use it, it shows them you actually read the call.
The Rationale: One thing publishers love to know is that you are actually paying attention to their market listing. One thing that happens all too often is authors sending material to places it has no business being—like a cook book to a religious publisher, (yes, this has happened.) Tell the editors and publishers why you feel your work would be a good fit for their publication. This shows you are thoughtful and familiar with what they are doing—both things a plus.
The Credentials: If you have previous publications, list the recent ones—don't go back 30 years in attempt to do this. If you don't have publications, still list any credentials that might be relevant—don't talk about your accomplishments in science if you are submitting poetry, or your history as an artist if you are submitting fiction—keep it all within the family.
The Signature: Like any other letter, end it with your name, sincerely, yours truly, many things will work but keep it short and sweet.
A few extra tips:
Be Humble: don't tell the editors or publishers how wonderful you are or how far you have come in life—unless you are Stephen King, or they have worked with you before, they aren't going to want to hear about how far you have come today—they care only about if the work is a good match.
Follow Directions: If you aren't going to follow directions, you are just wasting everyone's time. Don't send a 10,000 word story to a place that only accepts 3500 words or less because “this is just too good for you not to look at.”
Show Familiarity: If you have read a previous issue of the magazine, or a previous anthology by the publisher, it doesn't hurt to let them know you have—or that you are a fan. Many authors send out form letters to hundreds of publishers without really getting to know the feel for them—this is often a mistake and a waste of time on both sides. Familiarity is a good thing.