WTH swiftmailer

Now it’s kindda obvious that swift mailer is the best php mail library, but as any other great php library it sometimes lets you right in the middle of nowhere, when you’re thinking everything should be fine. This was the case with a freshly downloaded version … everything went fine until Swift_KeyCache_KeyCacheInputStream interface not found in … to shorten the story … swift looks for that interface which is expected to be in the file KeyCache.php … the declaration seems to be missing from the downloaded package … the fix is pretty simple(though there is probably a good reason why it isn’t there anymore, but for a quick fix will do) … open /classes/Swift/KeyCache.php and add these lines:

interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream
{

	public function setKeyCache(Swift_KeyCache $keyCache);
	
	public function setNsKey($nsKey);
	public function setItemKey($itemKey);
	public function setWriteThroughStream(Swift_InputByteStream $is);
	public function __clone();
}

save it … and you’re good to go.