Uploading to your Host

You only need to upload the "lib/" directory to your web host for production use. All other files and directories are support files not needed in production.

You will need FTP, rsync or similar software installed in order to upload the "lib/" directory to your web host.

To upload Swift Mailer:

  1. Open your FTP program, or a command line if you prefer rsync/scp.
  2. Upload the "lib/" directory to your hosting account.

The files needed to use Swift Mailer should now be accessible to PHP on your host.

The following example shows show you can upload the files using rsync on Linux or OS X.

Note: You do not need to place the files inside your web root. They only need to be in a place where your PHP scripts can "include" them.
chrisbook:Swift-4.0.0-dev chris$ rsync -rvz lib d11wtq@swiftmailer.org:swiftmailer
building file list ... done
created directory swiftmailer
lib/
lib/mime_types.php
lib/preferences.php
lib/swift_required.php
lib/classes/
lib/classes/Swift/
lib/classes/Swift/Attachment.php
lib/classes/Swift/CharacterReader.php
  ... etc etc ...
lib/dependency_maps/
lib/dependency_maps/cache_deps.php
lib/dependency_maps/mime_deps.php
lib/dependency_maps/transport_deps.php

sent 151692 bytes  received 2974 bytes  5836.45 bytes/sec
total size is 401405  speedup is 2.60
chrisbook:Swift-4.0.0-dev chris$

NOTE: Documentation for version 3 is in the wiki.