Downloading 

Downloading the Source http://www.swiftmailer.org/docs/install/downloading
Swift-3.0.0 Released on 19 Feb 07 http://www.swiftmailer.org/releases/Swift-3.0.0-php5.tar.gz

Installation 

$ php -i | grep ^extension_dir
extension_dir => /usr/lib/php/modules => /usr/lib/php/modules
rsync -vua lib/ /usr/lib/php/swift-lib/

help 

http://www.swiftmailer.org/wikidocs/v3/uploading

The directory you will want to upload is "lib". Be sure to keep the "lib" directory in-tact when you upload it. It is however safe to rename the directory to something more suitable such as "swift".

Swift does not need to be inside the web root, but it does need to be in a location which you are able to refer to in your PHP scripts which will use it (i.e. PHP needs to be able to see it, but your end-users don't).

Running the included tests 

http://www.swiftmailer.org/wikidocs/v3/testing

Swift comes with a complete set of tests just to ensure everything works the way it's expect to. There are two types of tests included with the library: Smoke Tests and Unit Tests. Both of these are found in the "tests" directory.

Smoke Tests are visual tests which you may run without much knowledge of testing in general. You run the tests, a set of instructions is presented to you on-screen and you check a few visual requirements to ensure things look as expected - easy! :)

Unit Tests go into much finer detail. They analyze the internals of the library from many different angles and make lots of expectations about what is supposed to happen. Several thousand expectations are made on this library and we want every single one of them to be satisfied. You'll need SimpleTest to run the Unit Tests.

Before you run either type of test, be sure to edit the "TestConfiguration.php" file in the "tests" directory. The tests will not run otherwise.

Running the Smoke Tests 

To run the smoke tests, simply edit the TestConfiguration.php file and then open the files in "tests/smokes" in your web browser. A message will be sent for each test. If the message sent successfully a green bar will appear and a set of instructions. If the message did not send successfully a red bar will appear along with the set of instructions and an error message.

Sending emails 

Sending a basic email 

http://www.swiftmailer.org/wikidocs/v3/basic

Sending an email with Swift Mailer is a simple process. You basically create a new instance of Swift with a connection type of your choice, you then create a message and ask Swift to deliver it to one or more recipients. Perhaps if you're not familiar with OOP this snippet may look a little daunting but it should hopefully soon become familiar to you and feel quite natural. EasySwift, packaged inside the library when you download it, provides a wrapper which makes this even simpler - at the expense of flexibility. Check the EasySwift documentation for more information.

<?php
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("smtp.your-host.tld"));
//Create the message
$message =& new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
if ($swift->send($message, "foo@bar.tld", "me@mydomain.com")) echo "Sent";
else echo "Failed";

This is the most basic way to send an email with Swift without using the EasySwift wrapper (which does make things simpler if you don't like OOP).