How to generate a plain text mail

Hi

I need to provide an option to the user to send mails in either html or plain text ( The mail contentes are always in html)

I have configured the client to promt the user for the mail format before sending the mail. This works fine (File/Preference/User Preference/Mail/Internet)

Can I do this same thing from my code. I want to have a format action button when the user click the format action button two radio option appear 1. HTML 2 Plain text and depending on the selection that the user does the mail is sent either in plain text or html.

Warm regards

Dominic