the \n character needs to be encased in double quotes, not single quotes. So if you look at your line now:
$output .= ''.$item.' '.$qty.' ';
php won't parse anything between the quotes (it's in the manual 😉 ) and so certain items are skipped. \t (tabs) wouldn't work either with single quotes. If you change it to this:
$output .= ''.$item.' '.$qty."\n";
it will work.
Notice how you do it down in the headers section?
$headers = 'From: webmaster@example.com' . "\r\n" .