title: Get the password of a Protected Post in functions.php
body: <p>I am working on a WordPress theme, and I would like an author to send an email to someone when a Protected Custom Post is published.</p>
  
  <p><strong>How to get the password of a Protected Post in functions.php?</strong></p>
  
  <p>I already created a metabox field (for the e-mail) and I am using <code>PHPMailer()</code> in my functions.php file. The function works to get the name and the URL of the post, but I now need to send the password by email...</p>