Problem when sending mail with Zend Mail?

后端 未结 4 1673
予麋鹿
予麋鹿 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:45

    Another great thing on Zend_Mail is that's chainable, so you can do this:

    $mail = new Zend_Mail();
    $mail->setBodyText('My Nice Test Text')
         ->setBodyHtml('My Nice Test Text')
         ->setFrom('test@example.com', 'Mr Example')
         ->addTo('contact@mypage.com', 'Mr Test')
         ->setSubject('TestSubject')
         ->send();
    

    Don't know for sure if 'chainable' is the right word, but I hope you got the point. This is just a free tip. The answer is given (right) by Benjamin

提交回复
热议问题