Problem when sending mail with Zend Mail?

后端 未结 4 1671
予麋鹿
予麋鹿 2020-12-31 02:53

I\'m trying to send an e-mail with ZendMail ( this simple script sums it up )

se         


        
4条回答
  •  时光取名叫无心
    2020-12-31 03:46

    As you can see in the Stack trace Zend_Mail uses Zend_Mail_Transport_Sendmail as transport adapter.
    So make sure a sendmail-compatible MTA (e.g. Postfix) is running on your system.

    As an alternative you could use the Zend_Mail_Transport_Smtp transport adapter and use an external SMTP-Server like so

    $tr = new Zend_Mail_Transport_Smtp('mail.example.com', array(
        'auth'     => 'login',
        'username' => $username,
        'password' => $password,
        'port'     => $port,
    ));
    Zend_Mail::setDefaultTransport($tr);
    

    Edit: For your 2nd Problem: a

    require_once('Zend/Mail/Transport/Smtp.php');

    should help.

提交回复
热议问题