send mail via 3rd party CGI
Hi,
here is another one...
You need a movie that either loads its mailform in a movieclip or that uses a movieclip for sending and receiving data
If you use a separate clip called "data", the code on the
submit button would be similar to
Code:
on(release) {
data.recipient = 'recipienthere';
data.email = _root.email; // sender's email
data.message = _root.message; // message to be sent
data.error = ''; // no error
data.loadMovie('http://www.fontimages.f2s.com/cgi-bin/3rdpartymail.cgi', POST);
play(); // goto next frame - and probably show "server busy" animation.
}
When mail is (not) sent, a function i_am_here in the parent (usually _root) will be called. This could be
Code:
function i_am_here()
{ if(data.status = 'ok')
gotoAndPlay('success');
else
{ error = data.error; // show error message - bad email or such
prevFrame(); // show form again
}
}
BTW: This is just for testing. If your movie works with it, go find a scripted server and install the script there. I am logging all requests - if it turns out somebody uses this for spamming, I will have to stop it
Musicman
Problems with CGI sending as well!! Not sure where to put my email sending info?
on (rollOver) {
this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
this.gotoAndPlay("s2");loadVariables();
}
on (release) {
for (i=1; i<_parent.fields_descriptions.length; i++) {
if (_parent[_parent.fields_descriptions[i][1]]!=_parent.fields_descriptions[i][2]) {
this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][1]]+"&777&"+_parent.fields_descriptions[i][2];
}
_parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[i][1], _parent.fields_descriptions[i][2]);
}
this.recipient=_parent.rec;
i=undefined;
getURL("contact."+_parent.serv, "_blank", "POST");
}