DokuWiki contains a wrapper around PHP's mail function that takes care of the proper encoding of headers and body. All mail functions are defined in inc/mail.php.
Sending mail should always be done through the mail_send function. Body and header texts should be passed as UTF-8 strings. The function takes care of the correct encoding.
Email addresses should be given in the form Real Name <mail@example.com> or just mail@example.com. Multiple addresses can be passed comma separated.
Use the simple utility function mail_isvalid to check if a given address is a valid email address. The function makes use of the php-email-address-validation library.