Fix exim delivery method for mailer hanlder

The code was extracted from the PR https://github.com/mikel/mail/pull/546. I tested this change and it worked in my VM. The pull request was opened over 10 months ago so I don't think it's reasonable to wait for any feedback there...