Mail Helper and file attachments

Permalink
I see in the mail helper some notes about attaching files to mail

* Sample Code:
     * $attachment = $mailHelper->addAttachment($fileObject);
     * $attachment->filename = "CustomFilename";
     * $mailHelper->send();
     *
I tried:
$mailHelper->addAttachment(File::getByID(17));
$attachment->filename = "CustomFilename";
But I get an error:
call_user_func_array() expects parameter 1 to be a valid callback, class 'Concrete\Core\File\Version' does not have a method 'getPath'


I don't know why I see an error about getPath, getByID is getting the file object? Does anyone have a solution? Does the mail helper really send attachments, I'm seeing some conflicting posts in the forums.

thanks

pvernaglia