Simpliest way to test SMTP connection
Posted: Tue Jan 06, 2009 2:06 pm
Can someone help me with this problem.
I am trying to check if user has provided valid login credentials and connection parameters.
After executing this piece of code, nothing happens. $result is NULL. How do i find error code and error message.
I need solution that works with both PHP5 and PHP4.
Thank you in advance!
I am trying to check if user has provided valid login credentials and connection parameters.
Code: Select all
$smtp = new Swift_Connection_SMTP($mailing_host, $mailing_port, $mailing_encryption);
$smtp->setUsername($mailing_username);
$smtp->setPassword($mailing_password);
$swift = new Swift($smtp);
$result = $swift->connect();
I need solution that works with both PHP5 and PHP4.
Thank you in advance!