Changed mail function to wp_mail