Hey! Keep up to date with the project through its beta and public launch by following @getsparks.

 
2
0
0
2,230 Installs

Basic Information: swift-mailer

Quickly add SwiftMailer functionality to your CodeIgniter Reactor project.

Contributor : ShawnMcCool
Email : Log in to view
Author Website : http://heybigname.com
Spark Website : https://github.com/heybigname/swift-mailer-spark
Repository Type : git
Number of Installs : 2,230

Get the Latest

  • 0.1.9 Pushed February 27th, 2012
    php tools/spark install -v0.1.9 swift-mailer Or download this version manually: Get swift-mailer-0.1.9.zip

How-To

Swift Mailer Spark v 0.1.9

Swift Mailer is an open source PHP Mailer library.

This spark exists to quickly integrate SwiftMailer's mailing features with CodeIgniter 2.

Installation

Sparks Manager

Navigate to the root of your CodeIgniter project and run

php tools/spark install swift-mailer

Manually

  • Navigate to your CodeIgniter project's 'sparks' folder
  • Extract the swift-mailer spark here, ensure it is named 'swift-mailer'

Documentation

SwiftMailer documentation can be found at http://swiftmailer.org.

You may want to start by creating messages then follow up by sending messages.

A Quick Test Run

Throw this into a controller and give it a run. Make sure that the sendmail path is correct.

$this->load->spark('swift-mailer/0.1.9');

// create the transport
$transport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs');

// create the mailer that will use the transport
$mailer = Swift_Mailer::newInstance($transport);

// create the message
$message = Swift_Message::newInstance();
$message->setSubject('test');
$message->setFrom('noreply@test.com');
$message->setTo(array('youremail@testdomain.com' => 'Your Name'));
$message->setBody('This is the body.');

// send the message
$mailer->send($message);

If you prefer to use abstraction mode then configure the spark by editing sparks/swift-mailer//config/swift-mailer.php then use:

$this->load->spark('swift-mailer/0.1.9');

$this->swiftmailer->create_message('test_message', 'Test message subject.', 'message body', 'from@email.com', 'to@email.com');
$result = $this->swiftmailer->send_message('test_message');

Contact and Credit

Swift Mailer was originally created and maintained by Chris Corbyn. Paul Annesley and Christopher Thompson joined the team in 2009. In September of 2009 Fabien Potencier took over maintenance of the project.

This spark was created and is maintained by Shawn McCool, is hosted on GitHub, and is made possible by the GetSparks team. Please support their project!

Older Versions

  • 0.1.5 Pushed August 8th, 2011
    php tools/spark install -v0.1.5 swift-mailer Or download this version manually: Get swift-mailer-0.1.5.zip
  • 0.0.1 Pushed August 1st, 2011
    php tools/spark install -v0.0.1 swift-mailer Or download this version manually: Get swift-mailer-0.0.1.zip

Comments

blog comments powered by Disqus