A more robust alternative to mxmehl's answer.
If you use filetype=mail
Vim will highlight headers for you:

We can use the syntax information to determine if a line is a header, and set the textwidth accordingly.
The syntax name of the headers are mailHeaderKey
, mailSubject
, mailHeaderEmail
, and mailHeader
. I found this out by looking at /usr/share/vim/vim74/syntax/mail.vim
.
The reason I prefer this solution is that it doesn't depend on arbitrary line numbers, but that it works equally correct for emails with one header and twenty headers.
augroup filetypes
autocmd!
autocmd FileType mail call s:mail()
augroup end
" Set up ft=mail
fun! s:mail()
augroup ft_mail
autocmd!
autocmd CursorMoved,CursorMovedI *
\ if index(["mailHeaderKey", "mailSubject", "mailHeaderEmail", "mailHeader"], synIDattr(synID(line('.'), col('.'), 1), 'name')) >= 0
\| setlocal textwidth=500
\| else
\| setlocal textwidth=72
\| endif
augroup end
endfun
textwidth
is applied to the whole buffer.line('.') < 5
, or by checking if the line starts with an email header (e.g.From:
,To:
, etc.).