PDA

View Full Version : How to activate a button to send email?



gino
06-28-2007, 05:13 PM
Hi all,

How do I activate a button so that it, like in HTML, opens for example Outlook Express with the email address I added?

Thanks for any help on this!

Cheers

NTD
06-28-2007, 08:33 PM
Hi,

It is a more professional look to use a mailform with a backend scripting language like PHP to process the email without the use of the users default email program. You can find a tutorial for creating your own custom mailform here...

http://ntdesigns.net/tutorial/Mailform.html

However, if all your after is using the users default email app, you can do something like this...



mySubmit.onRelease = function() {
myEmail = "you@yoursite.com";
userName = name_txt.text;
userEmail = email_txt.text;
userMessage = body_txt.text;
if (_root.userName == "" | userEmail == "" | userMessage == "") {
_root.body_txt.text = "Please enter the correct information";
} else {
getURL("mailTo:"+myEmail+"?subject=Message from: "+userName+", with the Email address of: "+userEmail+" &body="+body_txt.text);
}
}



hope it helps
NTD