Source for file sendMails.php
Documentation is available at sendMails.php
* Send mails to the devs telling them that their packages
* miss end user documentation.
require_once 'Console/Getargs.php';
require_once 'Console/ProgressBar.php';
'desc' => 'SMTP server'),
'desc' => 'SMTP server port',
'desc' => 'SMTP password'),
'debug' => array ('short' => 'd',
'desc' => 'Switch to debug mode.'),
'pretend' => array ('short' => 'p',
'desc' => 'Display what would be done, but do not send any mails.'),
$args = Console_Getargs ::factory ($config);
if (PEAR ::isError ($args)) {
if ($args->getCode () === CONSOLE_GETARGS_ERROR_USER ) {
echo Console_Getargs ::getHelp ($config, null , $args->getMessage ()). "\n";
} else if ($args->getCode () === CONSOLE_GETARGS_HELP ) {
echo Console_Getargs ::getHelp ($config). "\n";
$bDebug = $args->isDefined ('d');
$bPretend = $args->isDefined ('p');
'host' => $args->getValue ('server'),
'port' => $args->getValue ('port'),
'username' => $args->getValue ('user'),
'password' => $args->getValue ('password'),
Some of your packages in PEAR do not have end-user documentation
in the official PEAR manual. Since the best package is useless
without proper documentation, we ask you to write that for
the packages not having any. And do remember that the auto-generated
API-documentation does not replace end-user documentation as found
in the manual. Use case and examples as well as an introduction
to the way the package works is invaluable to the user wishing to use it.
Your packages missing documentation:
If you have already written documentation located on an
external server, plase consider transferring it into the PEAR manual.
If that is not possible we ask you to create a link
in the PEAR manual pointing to it.
In case you are not a developer of one of the mentioned packages,
the information in the package.xml file is wrong.
Ask the lead of that package to correct the data.
Please run examples/genMissingDocsPerDeveloper.php
and save the output into a file called
if (count($arData) == 0 ) {
echo "All packages seem to be documented. Nothing to do here.\n";
$bar = new Console_ProgressBar (' %fraction% [%bar%] ', '=>', ' ', 80 , count($arData));
$mail = Mail ::factory ('smtp', $arMailParams);
if (PEAR ::isError ($mail)) {
echo $mail->getMessage () . "\n";
foreach ($arData as $strDevEmail => $arUndocumented) {
if ($strDevEmail == '???' || $strDevEmail == '') {
$strPackages = implode(', ', $arUndocumented);
$strMailText = str_replace('{PACKAGES}', $strPackages, $strMessage);
echo 'Mail to ' . $strDevEmail . ' with text:' . "\n" . $strMailText . "\n\n";
$bar->update (++ $nCurrentMail);
'From' => 'pear-qa@lists.php.net',
'Reply-To' => 'pear-dev@lists.php.net',
'User-Agent' => 'QA_Peardoc_Coverage',
'Subject' => '[PEAR-QA] Missing package documentation reminder'
if (PEAR ::isError ($ret)) {
echo 'Could not send mail!' . "\n";
echo $ret->getMessage () . "\n";
echo "Done sending mails\n";
Documentation generated on Mon, 11 Mar 2019 15:10:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|