<form method="POST">
<?php if (get_field('manager_emails')) { ?>
<input type="hidden" name="admin_email" value="<?php the_field('manager_emails'); ?>">
<?php } ?>
</form>
<?
$to = trim($_POST["admin_email"]);
$m = mail($to, 'Заказ в магазине', $spectext.$message.'</body></html>', $headers);
echo var_dump($to);
if ($m) {echo 1;} else {echo 0;}