| @@ 121-138 (lines=18) @@ | ||
| 118 | return true; |
|
| 119 | } |
|
| 120 | ||
| 121 | function user ($user = "") { |
|
| 122 | // Sends the USER command, returns true or false |
|
| 123 | ||
| 124 | if( empty($user) ) { |
|
| 125 | $this->ERROR = "POP3 user: " . _("no login ID submitted"); |
|
| 126 | return false; |
|
| 127 | } elseif(!isset($this->FP)) { |
|
| 128 | $this->ERROR = "POP3 user: " . _("connection not established"); |
|
| 129 | return false; |
|
| 130 | } else { |
|
| 131 | $reply = $this->send_cmd("USER $user"); |
|
| 132 | if(!$this->is_ok($reply)) { |
|
| 133 | $this->ERROR = "POP3 user: " . _("Error ") . "[$reply]"; |
|
| 134 | return false; |
|
| 135 | } else |
|
| 136 | return true; |
|
| 137 | } |
|
| 138 | } |
|
| 139 | ||
| 140 | function pass ($pass = "") { |
|
| 141 | // Sends the PASS command, returns # of msgs in mailbox, |
|
| @@ 582-603 (lines=22) @@ | ||
| 579 | return $UIDLArray; |
|
| 580 | } |
|
| 581 | ||
| 582 | function delete ($msgNum = "") { |
|
| 583 | // Flags a specified msg as deleted. The msg will not |
|
| 584 | // be deleted until a quit() method is called. |
|
| 585 | ||
| 586 | if(!isset($this->FP)) |
|
| 587 | { |
|
| 588 | $this->ERROR = "POP3 delete: " . _("No connection to server"); |
|
| 589 | return false; |
|
| 590 | } |
|
| 591 | if(empty($msgNum)) |
|
| 592 | { |
|
| 593 | $this->ERROR = "POP3 delete: " . _("No msg number submitted"); |
|
| 594 | return false; |
|
| 595 | } |
|
| 596 | $reply = $this->send_cmd("DELE $msgNum"); |
|
| 597 | if(!$this->is_ok($reply)) |
|
| 598 | { |
|
| 599 | $this->ERROR = "POP3 delete: " . _("Command failed ") . "[$reply]"; |
|
| 600 | return false; |
|
| 601 | } |
|
| 602 | return true; |
|
| 603 | } |
|
| 604 | ||
| 605 | // ********************************************************* |
|
| 606 | ||