views:

32

answers:

1

Hi,

I have a problem sending a registration email via zend_mail. The mail is transmitted only to mails that have a @gmail.com.

$email = "[email protected]";
$mail = new Zend_Mail ();
$mail->setBodyText ( 'some text' );
$mail->setBodyHtml ( 'some text' );
$mail->setFrom ( '[email protected]', 'GeldOnkel.net' );
$mail->addTo ( $email, $email );
$mail->setSubject ( 'test' );
$mail->send ();

If the user has another email provider the email is not sent.

Any ideas?

A: 

I use smtp now and it works:

 $config = array('auth' => 'login',
                    'username' => '****@gmail.com',
                    'password' => '****',
                    'port' => '25',
                    'ssl' => 'tls');


 $transport = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', $config);
ArtWorkAD