cvs: php4 /pear/Mail RFC822.php mail.php mime.php sendmail.php smtp.php
| From: | Alexander Merz | Date: | Thu, 09 Aug 2001 00:53:57 +0000 |
| Subject: | cvs: php4 /pear/Mail RFC822.php mail.php mime.php sendmail.php smtp.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-440@lists.php.net to get a copy of this message | ||
alexmerz Wed Aug 8 20:53:57 2001 EDT
Modified files:
/php4/pear/Mail RFC822.php mail.php mime.php sendmail.php smtp.php
Log:
fix PHPDoc
Index: php4/pear/Mail/RFC822.php diff -u php4/pear/Mail/RFC822.php:1.8 php4/pear/Mail/RFC822.php:1.9 --- php4/pear/Mail/RFC822.php:1.8 Tue Jul 3 14:23:27 2001 +++ php4/pear/Mail/RFC822.php Wed Aug 8 20:53:56 2001 @@ -22,7 +22,8 @@ * * @author Richard Heyes <richard.heyes@heyes-computing.net> * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ + * @package Mail */ class Mail_RFC822 { @@ -94,10 +95,10 @@ * calling parseAddressList(). One or the other. * * @access public - * @param $address The address(es) to validate. - * @param $default_domain (Optional) Default domain/host etc. If not supplied, will be set to localhost. - * @param $nest_groups (Optional) Whether to return the structure with groups nested for easier viewing. - * @param $validate (Optional) Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. If not supplied, will be set to localhost. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. * * @return object Mail_RFC822 A new Mail_RFC822 object. */ @@ -115,10 +116,10 @@ * or when creating the object. One or the other. * * @access public - * @param $address The address(es) to validate. - * @param $default_domain (Optional) Default domain/host etc. - * @param $nest_groups (Optional) Whether to return the structure with groups nested for easier viewing. - * @param $validate (Optional) Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. * * @return array A structured array of addresses. */ @@ -163,7 +164,7 @@ * Splits an address into seperate addresses. * * @access private - * @param $address The addresses to split. + * @param string $address The addresses to split. * @return boolean Success or failure. */ function splitAddresses($address = '') @@ -236,7 +237,7 @@ * Checks for a group at the start of the string. * * @access private - * @param $address The address to check. + * @param string $address The address to check. * @return boolean Whether or not there is a group at the start of the string. */ function isGroup($address) @@ -260,8 +261,8 @@ * A common function that will check an exploded string. * * @access private - * @param $parts The exloded string. - * @param $char The char that was exploded on. + * @param array $parts The exloded string. + * @param string $char The char that was exploded on. * @return mixed False if the string contains unclosed quotes/brackets, or the string on success. */ function splitCheck($parts, $char) @@ -293,7 +294,7 @@ * Checks if a string has an unclosed quotes or not. * * @access private - * @param $string The string to check. + * @param string $string The string to check. * @return boolean True if there are unclosed quotes inside the string, false otherwise. */ function hasUnclosedQuotes($string) @@ -313,8 +314,8 @@ * This function handles both angle brackets and square brackets; * * @access private - * @param $string The string to check. - * @param $chars The characters to check for. + * @param string $string The string to check. + * @param string $chars The characters to check for. * @return boolean True if there are unclosed brackets inside the string, false otherwise. */ function hasUnclosedBrackets($string, $chars) @@ -337,9 +338,9 @@ * Sub function that is used only by hasUnclosedBrackets(). * * @access private - * @param $string The string to check. - * @param $num The number of occurences. - * @param $char The character to count. + * @param string $string The string to check. + * @param integer &$num The number of occurences. + * @param string $char The character to count. * @return integer The number of occurences of $char in $string, adjusted for backslashes. */ function hasUnclosedBracketsSub($string, &$num, $char) @@ -359,7 +360,7 @@ * Function to begin checking the address. * * @access private - * @param $address The address to validate. + * @param string $address The address to validate. * @return mixed False on failure, or a structured array of address information on success. */ function validateAddress($address) @@ -445,7 +446,7 @@ * Function to validate a phrase. * * @access private - * @param $phrase The phrase to check. + * @param string $phrase The phrase to check. * @return boolean Success or failure. */ function validatePhrase($phrase) @@ -485,7 +486,7 @@ * (umlauts, etc.), for example. * * @access private - * @param $atom The string to check. + * @param string $atom The string to check. * @return boolean Success or failure. */ function validateAtom($atom) @@ -518,7 +519,7 @@ * quoted-string = <"> *(qtext/quoted-pair) <"> * * @access private - * @param $qstring The string to check + * @param string $qstring The string to check * @return boolean Success or failure. */ function validateQuotedString($qstring) @@ -536,7 +537,7 @@ * / phrase route-addr ; name and route-addr * * @access private - * @param $mailbox The string to check. + * @param string &$mailbox The string to check. * @return boolean Success or failure. */ function validateMailbox(&$mailbox) @@ -615,7 +616,7 @@ * getting to this function. * * @access private - * @param $route_addr The string to check. + * @param string $route_addr The string to check. * @return mixed False on failure, or an array containing validated address/route information on success. */ function validateRouteAddr($route_addr) @@ -665,7 +666,7 @@ * route = 1#("@" domain) ":" * * @access private - * @param $route The string to check. + * @param string $route The string to check. * @return mixed False on failure, or the validated $route on success. */ function validateRoute($route) @@ -688,7 +689,7 @@ * domain = sub-domain *("." sub-domain) * * @access private - * @param $domain The string to check. + * @param string $domain The string to check. * @return mixed False on failure, or the validated domain on success. */ function validateDomain($domain) @@ -716,7 +717,7 @@ * subdomain = domain-ref / domain-literal * * @access private - * @param $subdomain The string to check. + * @param string $subdomain The string to check. * @return boolean Success or failure. */ function validateSubdomain($subdomain) @@ -736,7 +737,7 @@ * domain-literal = "[" *(dtext / quoted-pair) "]" * * @access private - * @param $dliteral The string to check. + * @param string $dliteral The string to check. * @return boolean Success or failure. */ function validateDliteral($dliteral) @@ -750,7 +751,7 @@ * addr-spec = local-part "@" domain * * @access private - * @param $addr_spec The string to check. + * @param string $addr_spec The string to check. * @return mixed False on failure, or the validated addr-spec on success. */ function validateAddrSpec($addr_spec) @@ -781,7 +782,7 @@ * local-part = word *("." word) * * @access private - * @param $local_part + * @param string $local_part * @return mixed False on failure, or the validated local part on success. */ function validateLocalPart($local_part) Index: php4/pear/Mail/mail.php diff -u php4/pear/Mail/mail.php:1.1 php4/pear/Mail/mail.php:1.2 --- php4/pear/Mail/mail.php:1.1 Fri Jul 27 10:16:06 2001 +++ php4/pear/Mail/mail.php Wed Aug 8 20:53:56 2001 @@ -16,12 +16,15 @@ // | Authors: Chuck Hagenbuch <chuck@horde.org> | // +----------------------------------------------------------------------+ // -// $Id: mail.php,v 1.1 2001/07/27 14:16:06 alexmerz Exp $ +// $Id: mail.php,v 1.2 2001/08/09 00:53:56 alexmerz Exp $ require_once ('Mail.php'); /** * internal PHP-mail() implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 1.2 $ */ class Mail_mail extends Mail { @@ -29,20 +32,20 @@ * Implements Mail_mail::send() function using php's built-in mail() * command. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error Index: php4/pear/Mail/mime.php diff -u php4/pear/Mail/mime.php:1.1 php4/pear/Mail/mime.php:1.2 --- php4/pear/Mail/mime.php:1.1 Wed Jul 4 13:22:00 2001 +++ php4/pear/Mail/mime.php Wed Aug 8 20:53:56 2001 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: mime.php,v 1.1 2001/07/04 17:22:00 cox Exp $ +// $Id: mime.php,v 1.2 2001/08/09 00:53:56 alexmerz Exp $ require_once 'PEAR.php'; @@ -32,17 +32,36 @@ * Sascha Schumann <sascha@schumann.cx>. * * @author Tomas V.V.Cox <cox@idecnet.com> +* @package Mail +* @access public */ -class Mail_mime extends PEAR +class Mail_mime extends Mail { - + /** + * contains the mime encoded text + * @var string + */ var $mime; + /** + * contains the multipart content + * @var string + */ var $multipart; + /** + * list of the attached images + * @var array + */ var $html_images = array(); + /** + * list of the attachements + * @var array + */ var $parts = array(); /* * Constructor function + * + * @access public */ function Mail_mime() { @@ -55,11 +74,12 @@ * text/plain part that emails clients who don't support * html should show. * - * @param $data string Either a string or the file name with the + * @param string $data Either a string or the file name with the * contents - * @param $isfile bool If true the first param should be trated + * @param bool $isfile If true the first param should be trated * as a file name, else as a string (default) * @return mixed true on success or PEAR_Error object + * @access public */ function setTXTBody($data, $isfile = false) { @@ -78,11 +98,12 @@ /* * Adds a html part to the mail * - * @param $data string Either a string or the file name with the + * @param string $data Either a string or the file name with the * contents - * @param $isfile bool If true the first param should be trated + * @param bool $isfile If true the first param should be trated * as a file name, else as a string (default) * @return mixed true on success or PEAR_Error object + * @access public */ function setHTMLBody($data, $isfile = false) { @@ -101,7 +122,9 @@ /* * Builds html part of email. * - * @acces private + * @param string $orig_boundary boundary of the beginning content + * type header + * @access private */ function build_html($orig_boundary) { @@ -163,9 +186,10 @@ /* * Adds an image to the list of embedded images. * - * @param $file_name string The image file name - * @param $c_type string The content type + * @param string $file_name The image file name + * @param string $c_type The content type * @return mixed true on success or PEAR_Error object + * @access public */ function addHTMLImage ($file_name, $c_type='application/octet-stream') { @@ -184,9 +208,10 @@ /* * Adds a file to the list of attachments. * - * @param $file_name string The file name of the file to attach - * @param $c_type string The content type + * @param string $file_name The file name of the file to attach + * @param string $c_type The content type * @return mixed true on success or PEAR_Error object + * @access public */ function addAttachment ($file_name, $c_type='application/octet-stream') { @@ -202,7 +227,7 @@ /* * Returns the contents of the given file name as string - * @param $file_name string + * @param string $file_name * @return string * @acces private */ @@ -222,7 +247,8 @@ /* * Builds an embedded image part of an html mail. * - * @acces private + * @param integer $i number of the image to build + * @access private */ function build_html_image ($i) { @@ -239,7 +265,9 @@ /* * Builds a single part of a multipart message. * - * @acces private + * @param array &$part Array containing the part data + * @return string containing the whole part + * @access private */ function & build_part(&$part) { @@ -272,6 +300,7 @@ * returns the mime content. * * @return string The mime content + * @access public */ function & get() { @@ -302,6 +331,7 @@ * (MIME-Version and Content-Type) * * @return array Assoc array with the standar mime headers + * @access public */ function & headers() { Index: php4/pear/Mail/sendmail.php diff -u php4/pear/Mail/sendmail.php:1.6 php4/pear/Mail/sendmail.php:1.7 --- php4/pear/Mail/sendmail.php:1.6 Mon Jul 30 15:18:41 2001 +++ php4/pear/Mail/sendmail.php Wed Aug 8 20:53:56 2001 @@ -20,6 +20,9 @@ /** * Sendmail implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 1.7 $ */ class Mail_sendmail extends Mail { @@ -40,8 +43,9 @@ * If a parameter is present in the $params array, it replaces the * default. * - * @param array Hash containing any parameters different from the + * @param array $params Hash containing any parameters different from the * defaults. + * @access public */ function Mail_sendmail($params) { @@ -52,20 +56,20 @@ * Implements Mail::send() function using the sendmail * command-line binary. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error Index: php4/pear/Mail/smtp.php diff -u php4/pear/Mail/smtp.php:1.5 php4/pear/Mail/smtp.php:1.6 --- php4/pear/Mail/smtp.php:1.5 Thu Feb 22 11:01:15 2001 +++ php4/pear/Mail/smtp.php Wed Aug 8 20:53:56 2001 @@ -21,6 +21,9 @@ /** * SMTP implementation of the PEAR Mail:: interface. Requires the PEAR * Net_SMTP:: class. + * @access public + * @package Mail + * @version $Revision: 1.6 $ */ class Mail_smtp extends Mail { @@ -32,7 +35,7 @@ /** * The port the SMTP server is on. - * @var int + * @var integer */ var $port = 25; @@ -70,6 +73,7 @@ * * @param array Hash containing any parameters different from the * defaults. + * @access public */ function Mail_smtp($params) { @@ -83,20 +87,20 @@ /** * Implements Mail::send() function using SMTP. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error
Index: php4/pear/Mail/RFC822.php diff -u php4/pear/Mail/RFC822.php:1.8 php4/pear/Mail/RFC822.php:1.9 --- php4/pear/Mail/RFC822.php:1.8 Tue Jul 3 14:23:27 2001 +++ php4/pear/Mail/RFC822.php Wed Aug 8 20:53:56 2001 @@ -22,7 +22,8 @@ * * @author Richard Heyes <richard.heyes@heyes-computing.net> * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ + * @package Mail */ class Mail_RFC822 { @@ -94,10 +95,10 @@ * calling parseAddressList(). One or the other. * * @access public - * @param $address The address(es) to validate. - * @param $default_domain (Optional) Default domain/host etc. If not supplied, will be set to localhost. - * @param $nest_groups (Optional) Whether to return the structure with groups nested for easier viewing. - * @param $validate (Optional) Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. If not supplied, will be set to localhost. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. * * @return object Mail_RFC822 A new Mail_RFC822 object. */ @@ -115,10 +116,10 @@ * or when creating the object. One or the other. * * @access public - * @param $address The address(es) to validate. - * @param $default_domain (Optional) Default domain/host etc. - * @param $nest_groups (Optional) Whether to return the structure with groups nested for easier viewing. - * @param $validate (Optional) Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. + * @param string $address The address(es) to validate. + * @param string $default_domain Default domain/host etc. + * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. + * @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance. * * @return array A structured array of addresses. */ @@ -163,7 +164,7 @@ * Splits an address into seperate addresses. * * @access private - * @param $address The addresses to split. + * @param string $address The addresses to split. * @return boolean Success or failure. */ function splitAddresses($address = '') @@ -236,7 +237,7 @@ * Checks for a group at the start of the string. * * @access private - * @param $address The address to check. + * @param string $address The address to check. * @return boolean Whether or not there is a group at the start of the string. */ function isGroup($address) @@ -260,8 +261,8 @@ * A common function that will check an exploded string. * * @access private - * @param $parts The exloded string. - * @param $char The char that was exploded on. + * @param array $parts The exloded string. + * @param string $char The char that was exploded on. * @return mixed False if the string contains unclosed quotes/brackets, or the string on success. */ function splitCheck($parts, $char) @@ -293,7 +294,7 @@ * Checks if a string has an unclosed quotes or not. * * @access private - * @param $string The string to check. + * @param string $string The string to check. * @return boolean True if there are unclosed quotes inside the string, false otherwise. */ function hasUnclosedQuotes($string) @@ -313,8 +314,8 @@ * This function handles both angle brackets and square brackets; * * @access private - * @param $string The string to check. - * @param $chars The characters to check for. + * @param string $string The string to check. + * @param string $chars The characters to check for. * @return boolean True if there are unclosed brackets inside the string, false otherwise. */ function hasUnclosedBrackets($string, $chars) @@ -337,9 +338,9 @@ * Sub function that is used only by hasUnclosedBrackets(). * * @access private - * @param $string The string to check. - * @param $num The number of occurences. - * @param $char The character to count. + * @param string $string The string to check. + * @param integer &$num The number of occurences. + * @param string $char The character to count. * @return integer The number of occurences of $char in $string, adjusted for backslashes. */ function hasUnclosedBracketsSub($string, &$num, $char) @@ -359,7 +360,7 @@ * Function to begin checking the address. * * @access private - * @param $address The address to validate. + * @param string $address The address to validate. * @return mixed False on failure, or a structured array of address information on success. */ function validateAddress($address) @@ -445,7 +446,7 @@ * Function to validate a phrase. * * @access private - * @param $phrase The phrase to check. + * @param string $phrase The phrase to check. * @return boolean Success or failure. */ function validatePhrase($phrase) @@ -485,7 +486,7 @@ * (umlauts, etc.), for example. * * @access private - * @param $atom The string to check. + * @param string $atom The string to check. * @return boolean Success or failure. */ function validateAtom($atom) @@ -518,7 +519,7 @@ * quoted-string = <"> *(qtext/quoted-pair) <"> * * @access private - * @param $qstring The string to check + * @param string $qstring The string to check * @return boolean Success or failure. */ function validateQuotedString($qstring) @@ -536,7 +537,7 @@ * / phrase route-addr ; name and route-addr * * @access private - * @param $mailbox The string to check. + * @param string &$mailbox The string to check. * @return boolean Success or failure. */ function validateMailbox(&$mailbox) @@ -615,7 +616,7 @@ * getting to this function. * * @access private - * @param $route_addr The string to check. + * @param string $route_addr The string to check. * @return mixed False on failure, or an array containing validated address/route information on success. */ function validateRouteAddr($route_addr) @@ -665,7 +666,7 @@ * route = 1#("@" domain) ":" * * @access private - * @param $route The string to check. + * @param string $route The string to check. * @return mixed False on failure, or the validated $route on success. */ function validateRoute($route) @@ -688,7 +689,7 @@ * domain = sub-domain *("." sub-domain) * * @access private - * @param $domain The string to check. + * @param string $domain The string to check. * @return mixed False on failure, or the validated domain on success. */ function validateDomain($domain) @@ -716,7 +717,7 @@ * subdomain = domain-ref / domain-literal * * @access private - * @param $subdomain The string to check. + * @param string $subdomain The string to check. * @return boolean Success or failure. */ function validateSubdomain($subdomain) @@ -736,7 +737,7 @@ * domain-literal = "[" *(dtext / quoted-pair) "]" * * @access private - * @param $dliteral The string to check. + * @param string $dliteral The string to check. * @return boolean Success or failure. */ function validateDliteral($dliteral) @@ -750,7 +751,7 @@ * addr-spec = local-part "@" domain * * @access private - * @param $addr_spec The string to check. + * @param string $addr_spec The string to check. * @return mixed False on failure, or the validated addr-spec on success. */ function validateAddrSpec($addr_spec) @@ -781,7 +782,7 @@ * local-part = word *("." word) * * @access private - * @param $local_part + * @param string $local_part * @return mixed False on failure, or the validated local part on success. */ function validateLocalPart($local_part) Index: php4/pear/Mail/mail.php diff -u php4/pear/Mail/mail.php:1.1 php4/pear/Mail/mail.php:1.2 --- php4/pear/Mail/mail.php:1.1 Fri Jul 27 10:16:06 2001 +++ php4/pear/Mail/mail.php Wed Aug 8 20:53:56 2001 @@ -16,12 +16,15 @@ // | Authors: Chuck Hagenbuch <chuck@horde.org> | // +----------------------------------------------------------------------+ // -// $Id: mail.php,v 1.1 2001/07/27 14:16:06 alexmerz Exp $ +// $Id: mail.php,v 1.2 2001/08/09 00:53:56 alexmerz Exp $ require_once ('Mail.php'); /** * internal PHP-mail() implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 1.2 $ */ class Mail_mail extends Mail { @@ -29,20 +32,20 @@ * Implements Mail_mail::send() function using php's built-in mail() * command. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error Index: php4/pear/Mail/mime.php diff -u php4/pear/Mail/mime.php:1.1 php4/pear/Mail/mime.php:1.2 --- php4/pear/Mail/mime.php:1.1 Wed Jul 4 13:22:00 2001 +++ php4/pear/Mail/mime.php Wed Aug 8 20:53:56 2001 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: mime.php,v 1.1 2001/07/04 17:22:00 cox Exp $ +// $Id: mime.php,v 1.2 2001/08/09 00:53:56 alexmerz Exp $ require_once 'PEAR.php'; @@ -32,17 +32,36 @@ * Sascha Schumann <sascha@schumann.cx>. * * @author Tomas V.V.Cox <cox@idecnet.com> +* @package Mail +* @access public */ -class Mail_mime extends PEAR +class Mail_mime extends Mail { - + /** + * contains the mime encoded text + * @var string + */ var $mime; + /** + * contains the multipart content + * @var string + */ var $multipart; + /** + * list of the attached images + * @var array + */ var $html_images = array(); + /** + * list of the attachements + * @var array + */ var $parts = array(); /* * Constructor function + * + * @access public */ function Mail_mime() { @@ -55,11 +74,12 @@ * text/plain part that emails clients who don't support * html should show. * - * @param $data string Either a string or the file name with the + * @param string $data Either a string or the file name with the * contents - * @param $isfile bool If true the first param should be trated + * @param bool $isfile If true the first param should be trated * as a file name, else as a string (default) * @return mixed true on success or PEAR_Error object + * @access public */ function setTXTBody($data, $isfile = false) { @@ -78,11 +98,12 @@ /* * Adds a html part to the mail * - * @param $data string Either a string or the file name with the + * @param string $data Either a string or the file name with the * contents - * @param $isfile bool If true the first param should be trated + * @param bool $isfile If true the first param should be trated * as a file name, else as a string (default) * @return mixed true on success or PEAR_Error object + * @access public */ function setHTMLBody($data, $isfile = false) { @@ -101,7 +122,9 @@ /* * Builds html part of email. * - * @acces private + * @param string $orig_boundary boundary of the beginning content + * type header + * @access private */ function build_html($orig_boundary) { @@ -163,9 +186,10 @@ /* * Adds an image to the list of embedded images. * - * @param $file_name string The image file name - * @param $c_type string The content type + * @param string $file_name The image file name + * @param string $c_type The content type * @return mixed true on success or PEAR_Error object + * @access public */ function addHTMLImage ($file_name, $c_type='application/octet-stream') { @@ -184,9 +208,10 @@ /* * Adds a file to the list of attachments. * - * @param $file_name string The file name of the file to attach - * @param $c_type string The content type + * @param string $file_name The file name of the file to attach + * @param string $c_type The content type * @return mixed true on success or PEAR_Error object + * @access public */ function addAttachment ($file_name, $c_type='application/octet-stream') { @@ -202,7 +227,7 @@ /* * Returns the contents of the given file name as string - * @param $file_name string + * @param string $file_name * @return string * @acces private */ @@ -222,7 +247,8 @@ /* * Builds an embedded image part of an html mail. * - * @acces private + * @param integer $i number of the image to build + * @access private */ function build_html_image ($i) { @@ -239,7 +265,9 @@ /* * Builds a single part of a multipart message. * - * @acces private + * @param array &$part Array containing the part data + * @return string containing the whole part + * @access private */ function & build_part(&$part) { @@ -272,6 +300,7 @@ * returns the mime content. * * @return string The mime content + * @access public */ function & get() { @@ -302,6 +331,7 @@ * (MIME-Version and Content-Type) * * @return array Assoc array with the standar mime headers + * @access public */ function & headers() { Index: php4/pear/Mail/sendmail.php diff -u php4/pear/Mail/sendmail.php:1.6 php4/pear/Mail/sendmail.php:1.7 --- php4/pear/Mail/sendmail.php:1.6 Mon Jul 30 15:18:41 2001 +++ php4/pear/Mail/sendmail.php Wed Aug 8 20:53:56 2001 @@ -20,6 +20,9 @@ /** * Sendmail implementation of the PEAR Mail:: interface. + * @access public + * @package Mail + * @version $Revision: 1.7 $ */ class Mail_sendmail extends Mail { @@ -40,8 +43,9 @@ * If a parameter is present in the $params array, it replaces the * default. * - * @param array Hash containing any parameters different from the + * @param array $params Hash containing any parameters different from the * defaults. + * @access public */ function Mail_sendmail($params) { @@ -52,20 +56,20 @@ * Implements Mail::send() function using the sendmail * command-line binary. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error Index: php4/pear/Mail/smtp.php diff -u php4/pear/Mail/smtp.php:1.5 php4/pear/Mail/smtp.php:1.6 --- php4/pear/Mail/smtp.php:1.5 Thu Feb 22 11:01:15 2001 +++ php4/pear/Mail/smtp.php Wed Aug 8 20:53:56 2001 @@ -21,6 +21,9 @@ /** * SMTP implementation of the PEAR Mail:: interface. Requires the PEAR * Net_SMTP:: class. + * @access public + * @package Mail + * @version $Revision: 1.6 $ */ class Mail_smtp extends Mail { @@ -32,7 +35,7 @@ /** * The port the SMTP server is on. - * @var int + * @var integer */ var $port = 25; @@ -70,6 +73,7 @@ * * @param array Hash containing any parameters different from the * defaults. + * @access public */ function Mail_smtp($params) { @@ -83,20 +87,20 @@ /** * Implements Mail::send() function using SMTP. * - * @param mixed Either a comma-seperated list of recipients + * @param mixed $recipients Either a comma-seperated list of recipients * (RFC822 compliant), or an array of recipients, * each RFC822 valid. This may contain recipients not * specified in the headers, for Bcc:, resending * messages, etc. * - * @param array The array of headers to send with the mail, in an + * @param array $headers The array of headers to send with the mail, in an * associative array, where the array key is the * header name (ie, 'Subject'), and the array value * is the header value (ie, 'test'). The header * produced from those values would be 'Subject: * test'. * - * @param string The full text of the message body, including any + * @param string $body The full text of the message body, including any * Mime parts, etc. * * @return mixed Returns true on success, or a PEAR_Error