Sometimes it's easy to address a cover letter because the job posting lists the hiring manager by name, or because you already know the name of the person you're sending it to. But when that's not the case, you can try to find the name, or come up with the best alternative, which may vary depending on the size and structure of the company. Don't make the mistake of sending a resume without a cover letter, whether you are sending it by email or postal mail.
Ways to Get a Name
Make every effort to find the name of the person doing the hiring. Search the company website because it may have a more specific job listing than in a newspaper or job posting website. Check the "About" section for a company directory, and try the search function if there is one. Look for the human resources director or the head of the department you are applying to. If you can't find a name on the website, call the company and speak to the receptionist. Be polite and explain that you are applying for a job and need the name to send the letter. Get the correct spelling. If the receptionist isn't helpful, wait awhile and call back and ask for the human resources department to get the name from them. If you can't get a name using these methods, ask someone you know who works there or does business with the company. If the company is local you might try a personal visit; they may be more likely to tell you a name in person.
If You Have No Name
Avoid a generic salutation such as "To Whom It May Concern" or "Dear Sir or Madam." Determine whether the hiring person is in the HR department or the head of the specific department with the opening and address the letter to "Personnel Director," "Human Resources Director," or "Marketing Department Head." Another option is to address the letter to the "Hiring Manager for" and fill in the name of the position for which you are applying.
Partial Name or Gender Ambiguity
If you have a last name only, or the first name leaves you unclear as to whether the person is a male or a female, don't assume. If you know the person's title, use the title in place of Mr. or Ms., such as "Dear Director Jones." If you have a first and last name, but the gender is unclear, address the letter to the full name with no title: "Dear Pat Smith."
Email vs. Postal Mail
Sending email resumes is more informal than sending a resume by postal mail. With an email, you may omit the salutation entirely if you have no name. For a postal letter, you can write the company name and address on the envelope, followed by the line "Attention: Personnel Department" on the envelope and then use a salutation such as "Dear Hiring Manager" on the cover letter. The most important thing is to ensure the letter and resume get to the right department. If you are replying to a job posting, use the address listed in the posting, but still get a name, since it shows initiative. If you are sending an unsolicited resume, it is important to be as specific as possible so that the resume is not discarded.