Show
Ignore:
Timestamp:
09/03/07 23:32:58 (1 year ago)
Author:
ryan
Message:

Remove trailing whitespace

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/class-phpmailer.php

    r5852 r6026  
    9797 
    9898    /** 
    99      * Sets word wrapping on the body of the message to a given number of  
     99     * Sets word wrapping on the body of the message to a given number of 
    100100     * characters. 
    101101     * @var int 
     
    116116 
    117117    /** 
    118      * Path to PHPMailer plugins.  This is now only useful if the SMTP class  
    119      * is in a different directory than the PHP include path.   
     118     * Path to PHPMailer plugins.  This is now only useful if the SMTP class 
     119     * is in a different directory than the PHP include path. 
    120120     * @var string 
    121121     */ 
     
    187187 
    188188    /** 
    189      *  Sets the SMTP server timeout in seconds. This function will not  
     189     *  Sets the SMTP server timeout in seconds. This function will not 
    190190     *  work with the win32 version. 
    191191     *  @var int 
     
    200200 
    201201    /** 
    202      * Prevents the SMTP connection from being closed after each mail  
    203      * sending.  If this is set to true then to close the connection  
    204      * requires an explicit call to SmtpClose().  
     202     * Prevents the SMTP connection from being closed after each mail 
     203     * sending.  If this is set to true then to close the connection 
     204     * requires an explicit call to SmtpClose(). 
    205205     * @var bool 
    206206     */ 
     
    229229 
    230230    /** 
    231      * Sets message type to HTML.   
     231     * Sets message type to HTML. 
    232232     * @param bool $bool 
    233233     * @return void 
     
    265265 
    266266    /** 
    267      * Sets Mailer to send message using the qmail MTA.  
     267     * Sets Mailer to send message using the qmail MTA. 
    268268     * @return void 
    269269     */ 
     
    279279 
    280280    /** 
    281      * Adds a "To" address.   
     281     * Adds a "To" address. 
    282282     * @param string $address 
    283283     * @param string $name 
     
    293293     * Adds a "Cc" address. Note: this function works 
    294294     * with the SMTP mailer on win32, not with the "mail" 
    295      * mailer.   
     295     * mailer. 
    296296     * @param string $address 
    297297     * @param string $name 
     
    307307     * Adds a "Bcc" address. Note: this function works 
    308308     * with the SMTP mailer on win32, not with the "mail" 
    309      * mailer.   
     309     * mailer. 
    310310     * @param string $address 
    311311     * @param string $name 
     
    319319 
    320320    /** 
    321      * Adds a "Reply-to" address.   
     321     * Adds a "Reply-to" address. 
    322322     * @param string $address 
    323323     * @param string $name 
     
    338338     * Creates message and assigns Mailer. If the message is 
    339339     * not sent successfully then it returns false.  Use the ErrorInfo 
    340      * variable to view description of the error.   
     340     * variable to view description of the error. 
    341341     * @return bool 
    342342     */ 
     
    385385 
    386386    /** 
    387      * Sends mail using the $Sendmail program.   
     387     * Sends mail using the $Sendmail program. 
    388388     * @access private 
    389389     * @return bool 
     
    415415 
    416416    /** 
    417      * Sends mail using the PHP mail() function.   
     417     * Sends mail using the PHP mail() function. 
    418418     * @access private 
    419419     * @return bool 
     
    432432            ini_set("sendmail_from", $this->Sender); 
    433433            $params = sprintf("-oi -f %s", $this->Sender); 
    434             $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,  
     434            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, 
    435435                        $header, $params); 
    436436        } 
     
    519519 
    520520    /** 
    521      * Initiates a connection to an SMTP server.  Returns false if the  
     521     * Initiates a connection to an SMTP server.  Returns false if the 
    522522     * operation failed. 
    523523     * @access private 
     
    530530        $hosts = explode(";", $this->Host); 
    531531        $index = 0; 
    532         $connection = ($this->smtp->Connected());  
     532        $connection = ($this->smtp->Connected()); 
    533533 
    534534        // Retry while there is no connection 
     
    552552                if($this->SMTPAuth) 
    553553                { 
    554                     if(!$this->smtp->Authenticate($this->Username,  
     554                    if(!$this->smtp->Authenticate($this->Username, 
    555555                                                  $this->Password)) 
    556556                    { 
     
    586586 
    587587    /** 
    588      * Sets the language for all class error messages.  Returns false  
     588     * Sets the language for all class error messages.  Returns false 
    589589     * if it cannot load the language file.  The default language type 
    590590     * is English. 
     
    614614 
    615615    /** 
    616      * Creates recipient headers.   
     616     * Creates recipient headers. 
    617617     * @access private 
    618618     * @return string 
     
    632632 
    633633    /** 
    634      * Formats an address correctly.  
     634     * Formats an address correctly. 
    635635     * @access private 
    636636     * @return string 
     
    641641        else 
    642642        { 
    643             $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" .  
     643            $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . 
    644644                         $addr[0] . ">"; 
    645645        } 
     
    651651     * Wraps message for use with mailers that do not 
    652652     * automatically perform wrapping and for quoted-printable. 
    653      * Original written by philippe.   
     653     * Original written by philippe. 
    654654     * @access private 
    655655     * @return string 
     
    713713              { 
    714714                $buf_o = $buf; 
    715                 $buf .= ($e == 0) ? $word : (" " . $word);  
     715                $buf .= ($e == 0) ? $word : (" " . $word); 
    716716 
    717717                if (strlen($buf) > $length and $buf_o != "") 
     
    751751 
    752752    /** 
    753      * Assembles message header.   
     753     * Assembles message header. 
    754754     * @access private 
    755755     * @return string 
     
    783783        $from[0][0] = trim($this->From); 
    784784        $from[0][1] = $this->FromName; 
    785         $result .= $this->AddrAppend("From", $from);  
     785        $result .= $this->AddrAppend("From", $from); 
    786786 
    787787        // sendmail and mail() extract Bcc from the header before sending 
     
    801801        if($this->ConfirmReadingTo != "") 
    802802        { 
    803             $result .= $this->HeaderLine("Disposition-Notification-To",  
     803            $result .= $this->HeaderLine("Disposition-Notification-To", 
    804804                       "<" . trim($this->ConfirmReadingTo) . ">"); 
    805805        } 
     
    808808        for($index = 0; $index < count($this->CustomHeader); $index++) 
    809809        { 
    810             $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     810            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), 
    811811                       $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); 
    812812        } 
     
    825825                if($this->InlineImageExists()) 
    826826                { 
    827                     $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",  
    828                                     "multipart/related", $this->LE, $this->LE,  
     827                    $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 
     828                                    "multipart/related", $this->LE, $this->LE, 
    829829                                    $this->boundary[1], $this->LE); 
    830830                } 
     
    860860        { 
    861861            case "alt": 
    862                 $result .= $this->GetBoundary($this->boundary[1], "",  
     862                $result .= $this->GetBoundary($this->boundary[1], "", 
    863863                                              "text/plain", ""); 
    864864                $result .= $this->EncodeString($this->AltBody, $this->Encoding); 
    865865                $result .= $this->LE.$this->LE; 
    866                 $result .= $this->GetBoundary($this->boundary[1], "",  
     866                $result .= $this->GetBoundary($this->boundary[1], "", 
    867867                                              "text/html", ""); 
    868868 
     
    886886                $result .= sprintf("Content-Type: %s;%s" . 
    887887                                   "\tboundary=\"%s\"%s", 
    888                                    "multipart/alternative", $this->LE,  
     888                                   "multipart/alternative", $this->LE, 
    889889                                   $this->boundary[2], $this->LE.$this->LE); 
    890890 
    891891                // Create text body 
    892                 $result .= $this->GetBoundary($this->boundary[2], "",  
     892                $result .= $this->GetBoundary($this->boundary[2], "", 
    893893                                              "text/plain", "") . $this->LE; 
    894894 
     
    897897 
    898898                // Create the HTML body 
    899                 $result .= $this->GetBoundary($this->boundary[2], "",  
     899                $result .= $this->GetBoundary($this->boundary[2], "", 
    900900                                              "text/html", "") . $this->LE; 
    901901 
     
    925925 
    926926        $result .= $this->TextLine("--" . $boundary); 
    927         $result .= sprintf("Content-Type: %s; charset = \"%s\"",  
     927        $result .= sprintf("Content-Type: %s; charset = \"%s\"", 
    928928                            $contentType, $charSet); 
    929929        $result .= $this->LE; 
     
    939939     */ 
    940940    function EndBoundary($boundary) { 
    941         return $this->LE . "--" . $boundary . "--" . $this->LE;  
     941        return $this->LE . "--" . $boundary . "--" . $this->LE; 
    942942    } 
    943943 
     
    993993     * @return bool 
    994994     */ 
    995     function AddAttachment($path, $name = "", $encoding = "base64",  
     995    function AddAttachment($path, $name = "", $encoding = "base64", 
    996996                           $type = "application/octet-stream") { 
    997997        if(!@is_file($path)) 
     
    10521052                $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); 
    10531053 
    1054             $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s",  
     1054            $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", 
    10551055                              $disposition, $name, $this->LE.$this->LE); 
    10561056 
     
    10641064            else 
    10651065            { 
    1066                 $mime[] = $this->EncodeFile($path, $encoding);                 
     1066                $mime[] = $this->EncodeFile($path, $encoding); 
    10671067                if($this->IsError()) { return ""; } 
    10681068                $mime[] = $this->LE.$this->LE; 
     
    11301130 
    11311131    /** 
    1132      * Encode a header string to best of Q, B, quoted or none.   
     1132     * Encode a header string to best of Q, B, quoted or none. 
    11331133     * @access private 
    11341134     * @return string 
     
    11831183 
    11841184    /** 
    1185      * Encode string to quoted-printable.   
     1185     * Encode string to quoted-printable. 
    11861186     * @access private 
    11871187     * @return string 
     
    12061206 
    12071207    /** 
    1208      * Encode string to q encoding.   
     1208     * Encode string to q encoding. 
    12091209     * @access private 
    12101210     * @return string 
     
    12441244     * @return void 
    12451245     */ 
    1246     function AddStringAttachment($string, $filename, $encoding = "base64",  
     1246    function AddStringAttachment($string, $filename, $encoding = "base64", 
    12471247                                 $type = "application/octet-stream") { 
    12481248        // Append to $attachment array 
     
    12591259 
    12601260    /** 
    1261      * Adds an embedded attachment.  This can include images, sounds, and  
    1262      * just about any other document.  Make sure to set the $type to an  
    1263      * image type.  For JPEG images use "image/jpeg" and for GIF images  
     1261     * Adds an embedded attachment.  This can include images, sounds, and 
     1262     * just about any other document.  Make sure to set the $type to an 
     1263     * image type.  For JPEG images use "image/jpeg" and for GIF images 
    12641264     * use "image/gif". 
    12651265     * @param string $path Path to the attachment. 
    1266      * @param string $cid Content ID of the attachment.  Use this to identify  
     1266     * @param string $cid Content ID of the attachment.  Use this to identify 
    12671267     *        the Id for accessing the image in an HTML form. 
    12681268     * @param string $name Overrides the attachment name. 
    12691269     * @param string $encoding File encoding (see $Encoding). 
    1270      * @param string $type File extension (MIME) type.   
     1270     * @param string $type File extension (MIME) type. 
    12711271     * @return bool 
    12721272     */ 
    1273     function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",  
     1273    function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", 
    12741274                              $type = "application/octet-stream") { 
    12751275 
     
    13981398 
    13991399    /** 
    1400      * Returns the proper RFC 822 formatted date.  
     1400     * Returns the proper RFC 822 formatted date. 
    14011401     * @access private 
    14021402     * @return string 
     
    14131413 
    14141414    /** 
    1415      * Returns the appropriate server variable.  Should work with both  
    1416      * PHP 4.1.0+ as well as older versions.  Returns an empty string  
     1415     * Returns the appropriate server variable.  Should work with both 
     1416     * PHP 4.1.0+ as well as older versions.  Returns an empty string 
    14171417     * if nothing is found. 
    14181418     * @access private 
     
    14761476 
    14771477    /** 
    1478      * Changes every end of line from CR or LF to CRLF.   
     1478     * Changes every end of line from CR or LF to CRLF. 
    14791479     * @access private 
    14801480     * @return string 
     
    14881488 
    14891489    /** 
    1490      * Adds a custom header.  
     1490     * Adds a custom header. 
    14911491     * @return void 
    14921492     */