- Symphony 2.3
-
› assets
8 -
› boot
9 -
› core
22 -
› email-gateways
3 -
› global
34 -
› interface
1 -
› toolkit
69 - Delegates89
- Deprecated27
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class SMTP
class.smtp.php #19A SMTP client class, for sending text/plain emails. This class only supports the very basic SMTP functions. Inspired by the SMTP class in the Zend library
Constants
static int TIMEOUT = 30
Methods
void __construct(
$host, $port, $options)
Constructor.
Host to connect to. Defaults to localhost (127.0.0.1)
Parameters
boolean checkConnection()
Checks to see if $this->_connection
is a valid resource. Throws an
exception if there is no connection, otherwise returns true.
void data(
$data)
Calls the data command on the server. Also includes header fields in the command.
void helo()
Initiates the ehlo/helo requests.
void mail(
$from)
Calls the MAIL command on the server.
Parameters
void quit()
Disconnects to the server.
void rcpt(
$to)
Calls the RCPT command on the server. May be called multiple times for more than one recipient.
Parameters
void rset()
Resets the current session. This 'undoes' all rcpt, mail, etc calls.
bool sendMail(
$from, $to, $subject, $message)
The actual email sending. The connection to the server (connecting, EHLO, AUTH, etc) is done here, right before the actual email is sent. This is to make sure the connection does not time out.
Parameters
void setHeader(
$header, $value)
Sets a header to be sent in the email.