Anas
Anas

Reputation: 21

sending email through exchange server via zend server

I want to send a local e-mail through exchange server but zend give me this Message

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

this is my code

$mailTransport = 
   new Zend_Mail_Transport_Smtp('smtpserver.edu.com', array(
            'auth'     => 'login',
            'username' => 'dummy.edu.com',
            'password' => '123456',
            'port'     => '25',
        ));           

        Zend_Mail::setDefaultTransport($mailTransport);

        $mail = new Zend_Mail();
        $mail->setFrom('dummy.edu.com');//[email protected]');
        $mail->setBodyHtml('some message - it may be html formatted text');
        $mail->addTo('dummy.edu.com', 'recipient');
        $mail->setSubject('subject');
        $mail->send();

I tried the same code in gmail configuration and it works perfectly please help me as fast as possible

Upvotes: 1

Views: 378

Answers (2)

Vishnu Kant Maurya
Vishnu Kant Maurya

Reputation: 15

$mail = new Mail\Message();
$mail->setBody("Send Mail");
$mail->setFrom('[email protected]', 'Test Site');
$mail->addTo($email_id, 'Test Site');
$mail->setSubject('Your connection is not stablish');

$transport = new Mail\Transport\Sendmail();
$transport->send($mail);

Upvotes: 1

Anas
Anas

Reputation: 21

I think that port 25, 23 and 587 are blocked because I tried to telnet them but it give me fail, so the problem may come from these blocking

Upvotes: 0

Related Questions