I am able to put an alert from the function. When I try using sforce.connection to send email it is not working.
Please find my code as below.
This method I am calling from the function required to send the email.
Can someone please help? Any thing like achieving it through Apex method or so will do for me.