Version: @(#) $Id: pickup_message.php,v 1.3 2004/09/22 21:21:31 mlemos Exp $
MIME E-mail message composing and sending using a Windows mail server pickup directory
Manuel Lemos (mlemos-at-acm.org)
Copyright ¿ (C) Manuel Lemos 1999-2004
@(#) $Id: pickup_message.php,v 1.3 2004/09/22 21:21:31 mlemos Exp $
Version: @(#) $Id: email_message.php,v 1.53 2004/09/14 03:01:04 mlemos Exp $
Implement an alternative message delivery method by dropping messages in a Windows mail server pickup directory, thus overriding the method of using the PHP mail() function implemented by the base class.
It is meant to be used by on Windows 2000 or later with IIS or Exchange mail servers because since this release the pickup directory started being supported.
It is much faster than relaying messages to an SMTP server because it works simply by storing messages in a special directory. This delivery method does not have the overhead of the SMTP protocol. The class does not need to wait for the mail server to pickup the messages and deliver them to the destination recipients. Therefore, it is recommended for bulk mailing.
This class should be used exactly the same way as the base class for composing and sending messages. Just create a new object of this class as follows and set only the necessary variables to configure details of the message pickup.
require('email_message.php');
require('pickup_message.php');
$message_object = new pickup_message_class;
- Requirements
You need to use at least Windows 2000 with IIS mail server or Exchange 2000 or later.
The PHP script using this class must also run in the same Windows machine on which the mail server is running. The current user must have sufficient privileges to write to the mail server pickup directory.
- Pickup directory
Before sending a message you need set the mailroot_directory variable to specify the path of the mail server directory, so the class knows where the messages must be dropped for subsequent pickup and delivery by the mail server.
string
''
Specify the path of the directory where the Pickup sub-directory is located. This sub-directory is used by the mail server to pickup the messages to deliver.
If this variable is set to an empty string, the class attempts to locate the directory automatically checking the registry.
If the class is not able to determine the mailroot directory path and you are certain that IIS or Exchange programs are installed in your Windows 2000 or later machine, set this variable to the correct path of your mail server root directory.
Usually it is located inside the Inetpub directory of IIS or Exchange installation path, but it may also be located in a slightly different path.
'C:\\Inetpub\\mailroot\\'
string
'pickup $Revision: 1.3 $'
Specify the text that is used to identify the mail delivery class or sub-class. This text is appended to the X-Mailer header text defined by the mailer variable.
Do not change this variable.