You have not describe in detail, but from the subject what i understand is you want to send email from application.
To Sent email you need to have smtp server and smtp port no.
below is the code to add on button click event
declare variables [subject, mail_body, smtpserver, smtpport, receiver, mail, sender]
mail_body="This is my first mail from application"
smtpserver="1.1.1.1";
smtpport=25;
sender="sender@check.com" ;
receiver="receive@a.com";
Subject="Test";
mail=Createobject("Jmail.smtpmail");
mail.ServerAddress=smtpserver + ":" + smtpport;
mail.sender=sender;
mail.subject=subject;
mail.AddRecepient(receiver);
mail.contentType="text/html";
mail.ISOEncodeHaders=False;
mail.contentTransferEncoding="8bit";
mail.body=mail_body;
mail.priority=3;
mail.execute();
mail=nothing;
You can also refer
http://articles.techrepublic.com.com/5100-10878_11-5794511.html[
^] for more information on smtp