It would be much simpler to have a button/link on your dialog that opened the user's default mail program. You can /run the mailto: format to open the program. Example:

//run mailto:your@email.com?subject=bug report&body=omg a bug!


-genius_at_work