flash 和PHP发邮件的方法
作者:shuhankuang 类型:原创 来源:闪吧
点击浏览该文件 
http://www.freepgs.com/shuhankuang/mail.swf
测试:
send按钮:
on (release) {
if (youremail.indexOf("@")>0) {//这里判断邮件格式是否符合。
if (youremail.indexOf(".")>youremail.indexOf("@")) {
y_mail = true;
}
}
if (femail.indexOf("@")>0) {
if (femail.indexOf(".")>femail.indexOf("@")) {
f_mail = true;
}
}
if (yourname != "" and fname != "" and message != "" and y_mail == 1 and f_mail == 1) {
loadVariables("mail.php", this, "POST");//和PHP通信。其实和TXT是一样的!
gotoAndStop("send");
} else {
gotoAndStop("wrong");
}
}
-------------------------------
PHP部分:
<?
$mailto=$femail;
$mailfrom=$youremail;
$subject="hello";
$mailmes=$message;
mail($mailto,$subject,$mailmes,$mailfrom);//
?>
if (youremail.indexOf("@")>0) {//这里判断邮件格式是否符合。
if (youremail.indexOf(".")>youremail.indexOf("@")) {
y_mail = true;
}
}
if (femail.indexOf("@")>0) {
if (femail.indexOf(".")>femail.indexOf("@")) {
f_mail = true;
}
}
if (yourname != "" and fname != "" and message != "" and y_mail == 1 and f_mail == 1) {
loadVariables("mail.php", this, "POST");//和PHP通信。其实和TXT是一样的!
gotoAndStop("send");
} else {
gotoAndStop("wrong");
}
}
-------------------------------
PHP部分:
<?
$mailto=$femail;
$mailfrom=$youremail;
$subject="hello";
$mailmes=$message;
mail($mailto,$subject,$mailmes,$mailfrom);//
?>
责任编辑:uufeng 时间:2004年6月9日
- 最近更新
