SendmailTransport.php 886 B

123456789101112131415161718192021222324252627282930313233
  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. * SendmailTransport for sending mail through a Sendmail/Postfix (etc..) binary.
  11. *
  12. * @author Chris Corbyn
  13. */
  14. class Swift_SendmailTransport extends Swift_Transport_SendmailTransport
  15. {
  16. /**
  17. * Create a new SendmailTransport, optionally using $command for sending.
  18. *
  19. * @param string $command
  20. */
  21. public function __construct($command = '/usr/sbin/sendmail -bs')
  22. {
  23. \call_user_func_array(
  24. [$this, 'Swift_Transport_SendmailTransport::__construct'],
  25. Swift_DependencyContainer::getInstance()
  26. ->createDependenciesFor('transport.sendmail')
  27. );
  28. $this->setCommand($command);
  29. }
  30. }