Send mail using Zend_Mail_Transport_Smtp


I’m new in DreamHost and I have this issue.

On my system I have the following code:

$config = array(‘auth’ => ‘login’, ‘username’ => ‘’, ‘password’ => ‘abcdefghij’);
$transport = new Zend_Mail_Transport_Smtp(‘’, $config);

$mail = new Zend_Mail();

$mail->setBodyText(‘This is the text of the mail.’);
$mail->setFrom(‘’, ‘Some Sender’);
$mail->addTo(‘’, ‘Some Recipient’);

The thing is, this is not working, but, if I clear the send() method param, the mail flows like a charm.
I can’t send mail authenticating on a server other than my own?