ezmlm is a software package for managing electronic mailing lists by Daniel J. Bernstein. It is similar to GNU Mailman and Majordomo but only works with the qmail mail transfer agent. It is released into the public domain.The latest version, 0.53, came out in 1997. The ezmlm-idx patches add modern features like MIME handling.
ezmlm provides all of the common electronic mailing list functionality: moderated lists, automated subscription and unsubscription, and digest creation. ezmlm takes advantage of the features of qmail to enable ordinary users to create and to manage mailing lists, without need for superuser privileges .
It can be used to send email
Example
<?php
$headers = “MIME-Version: 1.0n”;
$headers .= “Content-type: text/html; charset=iso-8859-1n”;
$headers .= “From: from@phpcodez.comn”;
$headers .= “Return-Path: info@phpcodez.comn”;
$headers .= “Return-Receipt-To: info@phpcodez.comn”;
@mail(“info@phpcodez.com”,”Test”, “Test Mail”, $headers);
?>
It calculates the hash value needed by EZMLM
Example
<?php
echo $hash = ezmlm_hash(“info@phpcodez.com”);
?>
Output
5
it lists files and directories of a given path.
Example
<?php
echo “<pre>”;
$dir = ‘/var/www/test/’;
$files1 = scandir($dir);
print_r($files1);
?>
Output
Array
(
[0] => .
[1] => ..
[2] => index.php
[3] => enc.php
)
It rewinds directory handle and can be used to check for changes in a directory.
Example
<?php
$dir = opendir(“/var/www/test/”);
while (($file = readdir($dir)) !== false)
echo $file . “<br />”;
rewinddir($dir);
closedir ($dir);
?>
Output
index.php
..
.
It reads entry from directory handle
Example
<?php
$path = “/var/www/test/”;
if (is_dir($path)) {
if ($dir = opendir ($path)) {
echo $directory = readdir($dir);
closedir ($dir);
}
}
?>
Output
index.php
It opens directory handle
Example
<?php
$path = “/var/www/test/”;
if (is_dir($path)) {
if ($dir = opendir($path)) {
echo $directory = readdir($dir);
closedir ($dir);
}
}
?>
Output
index.php
It returns the current working directory
Example
<?php
echo getcwd() . “<br />”;
chdir (‘../’);
echo getcwd() ;
?>
Output
/var/www/test/date
/var/www/test
It return an instance of the Directory class
Example
<?php
$dir = dir(“/var/www/test/date/”);
echo “Handle: ” . $dir->handle . “<br />”;
echo “Path: ” . $dir->path . “<br />”;
while (($val = $dir->read()) !== false) {
echo $val.”<br />”;
}
$dir->close();
?>
Output
Handle: Resource id #3
Path: /var/www/test/date/
index.php
enc.php
..
.
It closes directory handle
Example
<?php
$path = “/var/www/test/”;
if (is_dir($path)) {
if ($dir = opendir($path)) {
echo $directory = readdir($dir);
closedir($dir);
}
}
?>
Output
index.php
Posts navigation
Zend | Magento Certified PHP | eCommerce Architect