What is the correct way of sending a mail with an attachment to user in Moodle 2.0 ?

Re: What is the correct way of sending a mail with an attachment to user in Moodle 2.0 ?

дэргэд Jonas Asa. -
Хариу нийтлэлийн тоо: 0

Hi. How did you solve the problem? Can you show some code? Did you open a tracker issue?

I can get the filename

$requestform->get_new_filename('userfile')

but not the path to include as an argument for email_to_user.

Thank you.