Net_SMTP::connect() – Attempt to connect to the SMTP server.


require_once 'NET/SMTP.php';

mixed Net_SMTP::connect ( int $timeout = null )


Attempt to establish a connection with the SMTP server


integer $timeout

The timeout value (in seconds) for thesocket connection.

Return value

returns Returns a PEAR_Error with an error message on any kind of failure, or true on success.


throws no exceptions thrown


This function can not be called statically.

Attempt to do SMTP authentication. (Previous) Send the DATA command to start message body (Next)
Last updated: Sat, 21 Jan 2017 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.