SwiftMailer Component for CakePHP

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
bitter_moon_1
Forum Newbie
Posts: 5
Joined: Wed Jun 06, 2007 4:47 am

SwiftMailer Component for CakePHP

Post by bitter_moon_1 »

I am an active member on the CakePHP forums and think a lot of cake users would benefit from a working component for swift version 3.
Currently there is a tutorial for integrating swift v2 into cakephp, but the functionality is completely broken in swift v3.

http://bakery.cakephp.org/articles/view ... t-tutorial
http://bakery.cakephp.org/articles/view ... -component

When I try to use his component, I see the following error in my browser.
Fatal error: Call to undefined method SwiftMailerComponent::addTo() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\cake\app\controllers\posts_controller.php on line 19

What could be wrong? How do I go about debugging this? I'd like to make a working component for cake/swift3.0 available so that everybody can benefit from this..including myself.

Thanks,
Kunal
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Version 3 is in no way, shape or form like version 2. The API is entirely differently. Don't waste time debugging since if the component was written for version 2 it simply will not work with v3 ;)

The author did actually post here some time ago and I don't believe a conversion to Swift v3 was entirely out of the question. I'd be happy to help out but I don't really have the time at present and I'd also have to learn how to use CakePHP since I have no experience with the framework :(
bitter_moon_1
Forum Newbie
Posts: 5
Joined: Wed Jun 06, 2007 4:47 am

SwiftMailer Component for CakePHP

Post by bitter_moon_1 »

d11wtq wrote:Version 3 is in no way, shape or form like version 2. The API is entirely differently. Don't waste time debugging since if the component was written for version 2 it simply will not work with v3 ;)

The author did actually post here some time ago and I don't believe a conversion to Swift v3 was entirely out of the question. I'd be happy to help out but I don't really have the time at present and I'd also have to learn how to use CakePHP since I have no experience with the framework :(

Chris,
Thanks for clarifying that..I spent the last 2 days trying to figure out how to get the cakephp swift 2.0 component to work with swift v3!! I guess if there is no alternative I cant use swift with cake right now :( which is too bad because swift has a LOT of excellent features. I commend you for your work.

Kunal
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Of course you can use Swift ;) I'm sure Cake has ways to use 3rd-party classes and libraries without having to stir them into the cake mix?
bitter_moon_1
Forum Newbie
Posts: 5
Joined: Wed Jun 06, 2007 4:47 am

Post by bitter_moon_1 »

d11wtq wrote:Of course you can use Swift ;) I'm sure Cake has ways to use 3rd-party classes and libraries without having to stir them into the cake mix?
Yes, cake does allow you to create your custom components. Since we have a component for swift Version 2 available, would it be possible to send me a link from where I could download swift v2?
I know swift v2 is completely different from swift v3, but understanding swift v2's API would help me create a component for swift v3.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

bitter_moon_1
Forum Newbie
Posts: 5
Joined: Wed Jun 06, 2007 4:47 am

Post by bitter_moon_1 »

Many thanks.
Post Reply