title: Wordpress - Include username and password into email template
body: <p>I have a very simple code to send Wordpress users an email if their account has been approved.</p>
  
  <p>I would also like to send the username and password into this email.</p>
  
  <p>How would I do this ?</p>
  
  <p>Here is the code I use to send the email.</p>
  
  <pre><code>&lt;?php
  
  add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
  
  /*--------------------------------
  message received after account approval and account denied
  ------------------------------------*/
  /**
  * Modify the message sent to a user after being approved.
  *
  * @param $message The default message.
  * @param $user The user who will receive the message.
  * @return string the updated message.
  */
  function my_custom_message( $message, $user ) {
  $message = 'account approved, your login details are below:';
  return $message;
  }
  function my_deniedcustom_message( $message, $user ) {
  $message = 'Unfortunately you account has been denied membership';
  return $message;
  }
  // add a new custom approval message
  add_filter( 'new_user_approve_approve_user_message', 'my_custom_message' );
  
  // add a new custom denial message
  add_filter( 'new_user_approve_deny_user_message', 'my_deniedcustom_message' );
  ?&gt;
  </code></pre>