I installed Kohan Email module from http://github.com/banks/kohana-email to my Kohana Frameword and when I'm trying to register on my website I get following issue:
Fatal error: Cannot redeclare class Swift in
C:\xampp\htdocs\biblioteka\modules\email\vendor\swift\classes\Swift.php on line 29
I used following codes to send an email:
Email::send('example1@gmail.com', 'example2@gmail.com', 'tittle', 'content');
and
require Kohana::find_file('vendor', 'swift/swift_required', 'php');
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465);
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance('Email')
->setFrom(array('example1@gmail.com' => 'From'))
->setTo(array('example2@gmail.com'))
->setBody('An email');
$result = $mailer->send($message);
There's the same problem for boths of codes.