Send mail using Zend_Mail_Transport_Smtp

software development

#1

Hi,

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

On my system I have the following code:

[php]
$config = array(‘auth’ => ‘login’, ‘username’ => ‘someuser@domain.com.br’, ‘password’ => ‘abcdefghij’);
$transport = new Zend_Mail_Transport_Smtp(‘smtp.domain.com.br’, $config);

$mail = new Zend_Mail();

$mail->setBodyText(‘This is the text of the mail.’);
$mail->setFrom(‘someuser@somedomain.com’, ‘Some Sender’);
$mail->addTo(‘otheruser@otherdomain.com’, ‘Some Recipient’);
$mail->setSubject(‘TestSubject’);
$mail->$mail->setBodyHtml(‘OK’);
$mail->send($transport);
[/php]

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?

Thanks.