Details an applicant should include/exclude in an introductory letter to a prospective grad school adviser? I'm applying for graduate school (PhD in computer science), and I'm considering writing to faculty whose research areas match with what I intend to pursue, to understand:


Whether they'd be looking for new students at all in the coming year?
If they did, would they be potentially interested in my profile (I know no-one would guarantee an acceptance without me going through the process of application), but it would help to know if they would not be interested at all in me - which would leave me  free apply to other schools in which I get a neutral/positive response.


Keeping the above in mind, what would be the best way to introduce myself in the first mail?


What should be the salutation - I know "Respected Sir" sounds archaic, but was wondering if "Dear Professor X" sounded too informal or not!
Do I state my credentials (details of where I did my undergrads/masters) first, or do I state my purpose in writing to him/her?
How to mention my background concisely, without giving too much details, while at the same time not "underselling" myself as a potential grad student?
I want to give a link to my resume/profile hosted on my website - should I embed the hyperlink, or is it better to write the link in plain text?
How do I end such a letter - the obvious ones (such as "see you soon" or "till we meet again") being not quite suitable in this case)?


I'm basically afraid of saying too much (causing vexation) or too little (resulting in no response to my missive). I understand that the faculty are accustomed to seeing their inbox flooded with such mails each year, few of which ever get a positive response - which may not always be due to lack of an interesting profile, but the manner in which the mail is worded (Many professors have explicitly mentioned on their websites that they would not respond to generic "Do you have funding" type of queries no matter what the credentials of the student are!). 

Though my interest is specific to CS, I believe it would apply to other fields as well. Also, I would be interested in the opinions of both present faculty members (who have to sort through such mails), and past applicants to grad-school (who have the experience of successfully writing to their advisers before applying)...
I have a list of things you should do from my seniors (Some might disagree):


Try not to over-sell yourself. There is a fine line between stating facts about yourself and boasting. Stay on the former side.
Try not to mention things and leave them abruptly or incompletely. For e.g., Don't say "I was involved with a project in the University of X where we studied Cancer Treatment." (Thats it). What did you do? Where did it lead? What is the status now? Thats the crux of the information and sadly, that is left out.
Have an interesting question or comment in the mail. Merely stating that you read a paper or attended his talk is not enough. Billions of other students will be stating the same. What made you like it? Why was it relevant to you?
Side note: Surprisingly, many professors who I mailed have been interested on how I stumbled on his paper.
Never ask direct questions that the professor wouldn't like answering (At least in the first mail). Asking him about his funding status isn't the best idea in the first mail. This is true for many reasons: For one, most profs wouldn't like telling you such details without you proving you are worth it (Why would they?). Secondly, your intentions are getting obfuscated. Are you really interested in the professor ( &amp; his research) or his money? If his research was interesting but he couldn't fund you for X years, would you still go?
If this wasn't obvious, don't mass mail/mail merge. 
Be honest about what you say. This includes no exaggeration.
Make it short. No one likes reading a billion lines to find out who you are.
Emphasize your work and what differentiates you from the rest rather than your grades and scores. Grades and scores (GRE/AGRE) are bonuses (or deal breakers) but they are secondary.