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!