You are using an instance Swift_Mailer, and not Swift_Message, as in the example to which you are attached.
I think you need something like this:
$swift = email::connect();
$message = Swift_Message::newInstance();
$message->setSubject('hello')
->setFrom(array('alex@example.com.au' => 'Alex'))
->setTo(array('alex@example.com.au' => 'Alex'))
->setBody('hello')
->attach(Swift_Attachment::fromPath(DOCROOT . 'assets/attachments/instructions.pdf'));
$swift->send($message);
source
share