SmtpAgent.php 980 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Wraps an IoBuffer to send/receive SMTP commands/responses.
  11. *
  12. * @author Chris Corbyn
  13. */
  14. interface Swift_Transport_SmtpAgent
  15. {
  16. /**
  17. * Get the IoBuffer where read/writes are occurring.
  18. *
  19. * @return Swift_Transport_IoBuffer
  20. */
  21. public function getBuffer();
  22. /**
  23. * Run a command against the buffer, expecting the given response codes.
  24. *
  25. * If no response codes are given, the response will not be validated.
  26. * If codes are given, an exception will be thrown on an invalid response.
  27. *
  28. * @param string $command
  29. * @param int[] $codes
  30. * @param string[] $failures An array of failures by-reference
  31. */
  32. public function executeCommand($command, $codes = array(), &$failures = null);
  33. }