Log in

View Full Version : email issues



breichert1007
04-03-2006, 08:29 PM
I'm trying to send out an e-mail alert to a client when there status is
showing high. I want it to automatically e-mail the client without me
having to physically e-mail them myself. This is the script that I'm
running:
if (var1 == 1) {
setProperty("bill.b1",_visible,true);
setProperty("bill.b2",_visible,false);
setProperty("bill.b3",_visible,false);
bill.bill1=ns;
getURL("mailto:breichert1...@hotmail.com?subject=Alert Status" +
"&body=You are at a high alert status" +body);
}

if (var1 == 2) {
setProperty("bill.b1",_visible,false);
setProperty("bill.b2",_visible,true);
setProperty("bill.b3",_visible,false);
bill.bill1=ns;
}

if (var1 == 3) {
setProperty("bill.b1",_visible,false);
setProperty("bill.b2",_visible,false);
setProperty("bill.b3",_visible,true);
bill.bill1=ns;
}

When I go to my text file and set the value to a one it keeps opening
new messages over and over again. Is there a way to change the script
so it goes and e-mails the client on its own.

Twey
04-03-2006, 08:49 PM
What language is this?

James-
04-03-2006, 09:03 PM
looks like c or C++ o_O

breichert1007
04-03-2006, 09:14 PM
its flash actionscript

Twey
04-03-2006, 09:32 PM
I see. Well, there's no reason for your script to get stuck in a loop there; in fact, there aren't even any loops for it to get stuck in. If you post the rest of the code, I'll see if I can sort it. However, the best way to do this sort of thing will always be server-side.
looks like c or C++ o_OUnfortunately, so do most modern languages. Unless you know the language well enough to spot distinguishing marks, it's almost impossible to tell them apart. For example, the above script could quite easily be Javascript, Java, C, C++, or, apparently, Flash ActionScript. The only thing that could have given it away, if I'd known ActionScript, would have been the predefined functions used. However, if those functions were defined elsewhere, that's a perfectly valid example of any of the languages listed above, and probably quite a few more that I don't know or didn't think of.

breichert1007
04-03-2006, 09:49 PM
var1=1&var2=2&var3=3&ns=Medium&br=123
This is the txt file that I'm loading from: loadVariablesNum("alert.txt",0).
Whats happening is when I put a 1 in the txt box it just keep opening an e-mail message over and over again. Do I need to put another if statement in there somewhere and then use a ASP page to run it?

Twey
04-03-2006, 10:00 PM
I see no reason why that shouldn't work. Yes, ASP (or rather, another server-side language) is the best way of sending an email. You can do the whole thing in ASP, there is no need to use ActionScript. However, I don't know ASP, so I can't help you with writing the script. There are quite a few on these forums, I believe.

skilled1
04-03-2006, 10:37 PM
I see. Well, there's no reason for your script to get stuck in a loop there; in fact, there aren't even any loops for it to get stuck in. If you post the rest of the code, I'll see if I can sort it. However, the best way to do this sort of thing will always be server-side.Unfortunately, so do most modern languages. Unless you know the language well enough to spot distinguishing marks, it's almost impossible to tell them apart. For example, the above script could quite easily be Javascript, Java, C, C++, or, apparently, Flash ActionScript. The only thing that could have given it away, if I'd known ActionScript, would have been the predefined functions used. However, if those functions were defined elsewhere, that's a perfectly valid example of any of the languages listed above, and probably quite a few more that I don't know or didn't think of.

true that is why it appeard to be cold fusion script to me for a while there