Zend Mail - 电子邮件未发送

发布于 2024-09-26 05:36:22 字数 646 浏览 1 评论 0原文

我在通过 zend_mail 发送注册电子邮件时遇到问题。邮件仅传输至具有@gmail.com 的邮件。

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

如果用户有其他电子邮件提供商,则不会发送电子邮件。

有什么想法吗?

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]', 'MySite.net' );
$mail->addTo ( $email, $email );
$mail->setSubject ( 'test' );
$mail->send ();

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

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

じ违心 2024-10-03 05:36:22

我现在使用 smtp,它可以工作:

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


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

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);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文