is there a way to add custom header entries to the email output?
You should be able to set them by passing them in as msg.headers
Where msg.headers is an object like:
msg.headers = {
'x-my-key': 'header value',
'x-another-key': 'another value'
}