You will need to do some discovery and modification of the default headers set by PHPmailer for this to be achieved.
You will need to use different functions to set/edit headers depending on the type of header you want to set/edit. Here are a few examples:
From:
$mail->setFrom('from@example.com', 'Mailer');
Subject:
$mail->Subject = 'Here is the subject';
Custom:
$mail->addCustomHeader('X-custom-header', 'custom-value');
In short, It is quite an effort to do this when the headers are free-typed in a text box. It is however doable with detection and validation on your side.