Class Swift_Connection_Sendmail

Description

Swift Sendmail Connection

Located in /Swift/Connection/Sendmail.php (line 19)

Swift_ConnectionBase
   |
   --Swift_Connection_Sendmail
Class Constant Summary
Method Summary
Swift_Connection_Sendmail __construct ([string $command = "/usr/sbin/sendmail -bs"], [int $timeout = 10])
string findSendmail ()
string getCommand ()
string getFlags ()
string getPath ()
int getTimeout ()
boolean isAlive ()
void pipeIn (string $command, [ $end = "\r\n"])
string pipeOut ()
string read ()
void setCommand (string $command)
void setFlags (string $flags)
void setPath (string $path)
void setTimeout (int $secs)
void start ()
void stop ()
void write (string $command, [ $end = "\r\n"])
Methods
Constructor __construct (line 67)

Constructor

Swift_Connection_Sendmail __construct ([string $command = "/usr/sbin/sendmail -bs"], [int $timeout = 10])
  • string $command: The command to execute
  • int $timeout: The timeout in seconds before giving up
findSendmail (line 126)

For auto-detection of sendmail path

Thanks to "Joe Cotroneo" for providing the enhancement

string findSendmail ()
getCommand (line 170)

Get the sendmail command (path + flags)

string getCommand ()
getFlags (line 100)

Get the operating flags for the MTA

string getFlags ()
getPath (line 117)

Get the path to the binary

string getPath ()
getTimeout (line 84)

Get the timeout on the process

int getTimeout ()
isAlive (line 315)

Check if the process is still alive

boolean isAlive ()
pipeIn (line 179)

Write a command to the open pipe

  • throws: Swift_Connection_Exception If the pipe cannot be written to
void pipeIn (string $command, [ $end = "\r\n"])
  • string $command: The command to write
  • $end
pipeOut (line 190)

Read data from the open pipe

  • throws: Swift_Connection_Exception If the pipe is not operating as expected
string pipeOut ()
read (line 216)

Read a full response from the buffer (this is spoofed if running in -t mode)

  • throws: Swift_Connection_Exception Upon failure to read
string read ()
setCommand (line 153)

Set the sendmail command (path + flags)

  • throws: Swift_Connection_Exception If the command is not correctly structured
void setCommand (string $command)
  • string $command: Command
setFlags (line 92)

Set the operating flags for the MTA

void setFlags (string $flags)
  • string $flags
setPath (line 108)

Set the path to the binary

void setPath (string $path)
  • string $path: The path (must be absolute!)
setTimeout (line 76)

Set the timeout on the process

void setTimeout (int $secs)
  • int $secs: The number of seconds
start (line 262)

Try to start the connection

  • throws: Swift_Connection_Exception Upon failure to start
void start ()
stop (line 297)

Try to close the connection

  • throws: Swift_Connection_Exception Upon failure to close
void stop ()
write (line 244)

Write a command to the process (leave off trailing CRLF)

  • throws: Swift_Connection_Exception Upon failure to write
void write (string $command, [ $end = "\r\n"])
  • string $command: The command to send
  • $end

Inherited Methods

Inherited From Swift_ConnectionBase

Swift_ConnectionBase::getAttributes()
Swift_ConnectionBase::hasExtension()
Swift_ConnectionBase::postConnect()
Swift_ConnectionBase::setExtension()
Class Constants
AUTO_DETECT = -2 (line 24)

Constant for auto-detection of paths

Documentation generated on Tue, 06 Mar 2007 23:32:27 +0000 by phpDocumentor 1.3.1