English 中文(简体)
辛费诺语:法特语错误:没有在Cache/dev/appDevDebug ProjectContainer.php上找到的快速通话
原标题:Symfony2:: Fatal error: Class Swift_Mailer not found in cache/dev/appDevDebugProjectContainer.php on line 1331

I installed symfony2 and FOSUserBundle. Both are working correctly, however when I access the registration page of FOSUserBundle, which is using SwiftMailer as for email confirmation I get the following error instantly.

Fatal error: Class  Swift_Mailer  not found in /home/public_html/cache/dev/appDevDebugProjectContainer.php on line 1331

第1331条有以下代码:

return $this->services[ mailer ] = new Swift_Mailer($this->get( swiftmailer.transport ));

在简便信息中,我看到邮局Bundle被正确地装载。 现在我 st忙,我一直在相当一段时间内为此而努力,我不熟悉我的国名。 确实,这预示着我行不通,但一把新鲜眼睛会有所助益。 我没有东西,这难道是可想象的吗? 快速邮电舱实际上是在服务器上,设在供应商/偷窃邮件/偷窃邮件/校准/打字/偷窃/送信员之下。

谁能帮助? 感谢很多!

最佳回答

您可以检查一下您的直观中是否有这些线。 php:

// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__. /../vendor/swiftmailer/lib/classes/Swift.php ;
Swift::registerAutoload(__DIR__. /../vendor/swiftmailer/lib/swift_init.php );
问题回答

暂无回答




相关问题
Sending an HTML email using Swift

I would like to send an auto-generated email with HTML body from my application using Swift. Here is my current code: $message = Swift_Message::newInstance() ->setFrom(array( ...

Why is SwiftMailer throwing "Internal Server Error"?

I am using Symfony + SwiftMailer and getting the following error from SwiftMailer: 500 | Internal Server Error | Swift_TransportException Expected response code 220 but got code "", with message "" ...

Swift Mailer Error

Im using the following code to send a message: try { require_once "lib/Swift.php"; require_once "lib/Swift/Connection/SMTP.php"; $smtp =& new Swift_Connection_SMTP("mail.somedomain....

Swift Mailer email sending issue

i have downloaded Swift Mailer from their website and try to send simple email with following code <?php require_once lib/swift_required.php ; $transport = Swift_SmtpTransport::...

symfony 1.4 adding a BCC recipient to mailer

I know with swift directly you can create a Recipient_List and do ->addBcc() . How would i do this same thing in the context of symfony 1.4 $message = $this->getMailer()->compose(); $message-&...

Email body in Symfony 1.4 mailer?

I m using the Symfony 1.4 mailer where I build the various bits needed for an email and then send it out using: $this->getMailer()->composeAndSend($sender, $recipient, $subject, $body); In the ...

Unable to send mail in Symfony 1.31

I am trying to send email using the following method in my action class: public function executeTestnewmail() { // send an email to the affiliate $message = $this->getMailer()->...

热门标签