* function initStream - reserved for extended functionality
*
* This function is not yet implemented.
* Reserved for extended functionality.
* UPDATE: It is implemented in Deliver_SMTP and Deliver_SendMail classes,
* but it remains unimplemented in this base class (and thus not
* in Deliver_IMAP or other child classes that don't define it)
*
* NOTE: some parameters are specific to the child class
* that is implementing this method
*
* @param Message $message Message object
* @param string $domain
* @param integer $length
* @param string $host host name or IP to connect to
* @param integer $port
* @param string $user username to log into the SMTP server with
* @param string $pass password to log into the SMTP server with
* @param boolean $authpop whether or not to use POP-before-SMTP authorization
* @param string $pop_host host name or IP to connect to for POP-before-SMTP authorization
* @param array $stream_options Stream context options (OPTIONAL), see http://www.php.net/manual/context.php and especially http://www.php.net/manual/context.ssl.php
*
* @return handle $stream file handle resource to SMTP stream
$now_date = date('D, j M Y H:i:s ', $now) . $this->timezone();
// TODO: Do we really want to preserve possibly old date? Date header should always have "now"... but here is not where this decision should be made -- the caller really should blank out $rfc822_header->date even for drafts being re-edited or sent
if (!empty($rfc822_header->date) && $rfc822_header->date != -1)
$message_date = date('D, j M Y H:i:s ', $rfc822_header->date) . $this->timezone();
else {
$message_date = $now_date;
$rfc822_header->date = $now;
}
/* Create a message-id */
$message_id = 'MESSAGE ID GENERATION ERROR! PLEASE CONTACT SQUIRRELMAIL DEVELOPERS';
// FIXME: The following headers may generate slightly differently between the message sent to the destination and that stored in the Sent folder because this code will be called before both actions. This is not necessarily a big problem, but other headers such as Message-ID and Date are preserved between both actions