I've managed to display layers via the YUI panels, but I'm having some trouble with the YUI Dialog:

I'd like to use the YUI Dialog to display a form. On klicking 'submit' the form should be sent to an e-mail adress. Displaying the form is no problem (same configuration as the panels), but how do I set up the form's recipient? Do I have to send the form to a separate file for further processing or can I handle the 'mailing' inside the main file itself?

Maybe there are any tutorials or examples on sending mails using the YUI? Thanks!