Using wp_mail in functions.php

You need to supply or line breaks for your header fields. For example:

$headers = "From:" . $from . PHP_EOL;

Or put the header fields into an array, in which case you don’t need to add the line breaks manually.

$headers[] = "From:" . $from;

Email headers are not ‘normal’ text. Those line ending are meaningful. They are control characters.

There are examples in the Codex.