I am trying to send mail via mandrill app using swift mailer. This is my code:
$transport = Swift_SmtpTransport::newInstance('smtp.mandrillapp.com',587);$transport->setUsername($username);$transport->setPassword($password);// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport);// Create the message$message = Swift_Message::newInstance() // Give the message a subject ->setSubject('New Order '.$reservationNumber) // Set the From address with an associative array ->setFrom(array('noreply@domain.com' => 'domain.com')) // Set the To addresses with an associative array ->setTo('test@domain.com') // Give it a body ->setBody($body,'text/html');$mailer->send($message);
Credentials are 100% good. And i get timeout error: Connection could not be established with host smtp.mandrillapp.com [Connection timed out #110].
It looks like something is blocking connection. Maybe this is issue with server configurations? We are using WHM software on our centos server