Create each of the text members referenced in the code below in your movie's cast. I am assuming that some of the information is meant to be supplied by the user of your program (such as the subject and message). Those text members can be placed on the stage and made editable so that the user can fill them out. The others can just be left in the cast and you can put the proper text in them (such as pop.gmx.com in the "server" member).
Now attach this behavior to a button:
on mouseUp me
emailProps = [:]
emailProps[#to] = member("to").text
emailProps[#from] = member("from").text
emailProps[#server] = member("server").text
emailProps[#user] = member("user").text
emailProps[#password] = member("password").text
emailProps[#subject] = member("subject").text
emailProps[#body] = member("body").text
errorcode = sendmail(emailProps)
This isn't the most elogant Lingo ever written, but should be easy to understand for a newbie. You should read up on the concept of a property list. It is very important and is the only "advanced" concept in the code. Also, the code simply throws up an alert message displaying the result of the sendmail. You probably want to handle it a bit differently.
Hi Mister Mux!
Thanx for taking your time..
I did exactly as u wrote but i get message:
Script error: String expected
when I push the send button with the script, why? I have put my the xtras in right folder and added the xtra into my director file but i dont think thats the problem. The gmx mail works fine when using it in outlook express by the way.
That is my mistake. The alert function takes a string as an argument,
but errorCode is an integer. So either change it to
or get rid of the line all together. It is not needed, I just put it
there so that you could see the result of the attempt to send mail.
Strange I cant get it to work...i only get the message:
Has any1 made it with the extra?