TL;DR: Prefer the email in the resume's header contact block and ignore addresses in footers, disclaimers, and reference sections. The right address is almost always in the top third of the first page, near the candidate's name. After the fix, re-parsed resumes return the header address.

```text
agent extracted the wrong email from a resume  -  the PDF had two addresses and it picked the one in the footer disclaimer
```

1. Open the PDF and list every email address it contains, noting where each one appears (header, footer, disclaimer, reference letter). Expected: at least two addresses, one in the header contact block and one in the footer disclaimer.
2. Check which address the parser stored. Expected: the stored address is the footer one.
3. Add an address-ranking rule: score addresses by vertical position (top third of page one ranks first) and penalize any address within a few lines of words like "disclaimer", "confidential", "privacy", or "do not reply". Expected: a re-parse returns the header address.
4. Sanity-check the result: the stored address should look like a personal address and line up with the candidate's name. Expected: the first outreach attempt does not bounce and the address matches the candidate.

## Use this when
- A candidate's extracted email bounces or replies come from the wrong person
- The resume PDF visibly contains more than one email address
- The stored address sits in a footer, disclaimer, or reference section

## Not for this skill when
- The PDF contains only one email address and it still bounces (that is a stale address, not a wrong pick)
- The parser extracted no email at all
- The wrong data is a phone number or a name, not the email

## Variant phrasings
### Resume parser picked the email from the disclaimer instead of the header
### Agent extracted the footer email from a resume with two addresses
### Candidate email belongs to a different person after parsing

## Why it happens
Many extractors grab the first email-shaped string in raw PDF order, and footers or disclaimers can appear before the header in that order. Without a position-based ranking rule, the parser has no way to prefer the address the candidate actually put in their contact block.

## Edge cases
- Resumes where the header address is a university address and the footer has the personal one: still prefer the header, but flag the candidate for a manual check
- Reference letters attached at the end of the PDF: exclude everything after the references heading from email extraction entirely
- Two-column resumes where the header contact block sits in a sidebar: position scoring should use the main contact region, not just the top of the page

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_uDW0nfOG1oqucfWwsyManA
