====== Handling E-Mails in DokuWiki ====== DokuWiki contains a wrapper around PHP's [[phpfn>mail]] function that takes care of the proper encoding of headers and body. All mail functions are defined in [[xref>inc/mail.php]]. ===== Sending Mail ===== Sending mail should always be done through the [[xref>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 %%'' or just ''mail@example.com''. Multiple addresses can be passed comma separated. ===== Checking for valid E-Mail ===== Use the simple utility function [[xref>mail_isvalid]] to check if a given address is a valid email address. The function makes use of the [[http://code.google.com/p/php-email-address-validation/|php-email-address-validation]] library.