Friday, June 7, 2013

Re: SwiftMailer Component not working CakePHP 2.0.5

In this case you need use App::import.

App::import('Vendor', 'Swift', array('file' => 'Swift'.DS.'lib'.DS.'swift_required.php'));

Em segunda-feira, 16 de janeiro de 2012 05h07min23s UTC-2, Craig escreveu:
Hi All,

I have followed the guide on the Cake Bakery using the the SwiftMailer
component:

http://bakery.cakephp.org/articles/rajibahmed/2011/02/23/cakephp_swiftmailer4_x_x_component_with_batch_send

I have followed the instructions but keep getting 'failed to send
email: SwiftMailer was not included, check the path and filename'. I
am aware that the CakePHP 2.0 has changed the Class Loading syntax as
indicated in the migration guide but I am having no success. I have
amended the following line in /app/Controllers/Components/
SwiftMailerComponent.php as per CakePHP 2.0.5 requirements:
App::uses('Swift', array('file' => 'lib'.DS.'swift_required.php',
'Vendor'));
The location of the Swift Library is /app/Vendor/Swift/lib/
swift_required.php.

Any help would be highly appreciated.

Thanks,

Craig

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: