>> It's not ideal, but I found it a lot easier to use than the components 
>> floating around.

O'Really ?

How's a bunch of line of codes *easier*  than one line ?

It also is about abstraction, reusability and whatnot, what if you
send mail elsewhere in your application you're gonna create a method
in your AppController you say ? oh wait! you're gonna create a
component for it ? yet another component ?

Anthony:

The SwiftMailer component works only for version 2, not compatible
with version 3, because the api 3 changed a lot of stuff. Though I'm
working on updating the component for version 3, in fact it's already
done, I just need to update the tutorial at bakery and upload the
component. swift mailer 2 is available for download at sourceforge
IIRC.

However you really need it




On Apr 6, 6:37 am, "Aidan Lister" <[EMAIL PROTECTED]> wrote:
> Hi Anthony,
>
> I found it a lot easier just to use Swift as a vendor package.
>
> Place it in your vendor folder, call your $this->render inside an
> output buffer, and pass this to Swift.
>
> It's not ideal, but I found it a lot easier to use than the components
> floating around.
>
> <?php
> // Load in the components
> vendor('Swift');
> vendor('Swift/Connection/SMTP');
>
> // Instantiate swift
> $connection = new Swift_Connection_SMTP();
> $swift = new Swift($connection);
>
> // Grab the email contents
> ob_start();
> $this->set('event', $event);
> $this->render('emails/studenteventinfo', 'email');
> $message = ob_get_contents();
> ob_end_clean();
>
> // Send the email
> $swift->send($studentemails, $from, $subject, $message);
>
> // Show any errors
> if ($swift->hasFailed()) {
>         $this->set('errors', $swift->getErrors());}
>
> ?>
>
> On 06/04/07, Anthony <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi, I'm using the SwiftMailer Component for CakePHP found here:
> >http://bakery.cakephp.org/articles/view/193
>
> > However, the newest version of SwiftMailer is 3, while the component
> > is designed for 2 and no longer works "out of the box". Is there a
> > version out there for version 3? Or does anybody know where I can find
> > an old version 2 download of SwiftMailer?
>
> > Thanks,
>
> > Anthony


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to