|
@@ 366-374 (lines=9) @@
|
| 363 |
|
$this->message = new Message(); |
| 364 |
|
} |
| 365 |
|
|
| 366 |
|
public function accept($message = "OK") { |
| 367 |
|
if ($this->state != self::STATUS_PROCESSING) { |
| 368 |
|
throw new \DomainException("SMTP Connection not in a valid state to accept a message."); |
| 369 |
|
} |
| 370 |
|
$this->loop->cancelTimer($this->defaultActionTimer); |
| 371 |
|
unset($this->defaultActionTimer); |
| 372 |
|
$this->sendReply(250, $message); |
| 373 |
|
$this->reset(); |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
public function reject($code = 550, $message = "Message not accepted") { |
| 377 |
|
if ($this->state != self::STATUS_PROCESSING) { |
|
@@ 376-384 (lines=9) @@
|
| 373 |
|
$this->reset(); |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
public function reject($code = 550, $message = "Message not accepted") { |
| 377 |
|
if ($this->state != self::STATUS_PROCESSING) { |
| 378 |
|
throw new \DomainException("SMTP Connection not in a valid state to reject message."); |
| 379 |
|
} |
| 380 |
|
$this->defaultActionTimer->cancel(); |
| 381 |
|
unset($this->defaultActionTimer); |
| 382 |
|
$this->sendReply($code, $message); |
| 383 |
|
$this->reset(); |
| 384 |
|
} |
| 385 |
|
|
| 386 |
|
/** |
| 387 |
|
* Delay the default action by $seconds. |