我正在构建Flash网站,我希望将联系信息发送到我的Gmail地址。通过PHP从Flash应用程序发送邮件
我使用的Lynda.com教程说我需要“输入php地址”。那是什么,我该怎么做?
这是我的代码编辑
if (thename.text == "" || theemail.text == "" || thephone.text == "" || themessage.text =="") {
thefeedback.text = "*Please fill out all fields";
} else {
var allvars:URLVariables = new URLVariables()
allvars.name = thename.text;
allvars.email = theemail.text;
allvars.phone = thephone.text;
allvars.message = themessage.text;
// Send info to a new request
var mailAddress:URLRequest = new URLRequest("http://whatever goes here.php");
mailAddress.data = allvars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
thefeedback.text = "Thank You";
thename.text = "";
theemail.text = "";
thephone.text = "";
themessage.text = "";
}
能否请您编辑您的问题,包括**您的Flash应用程序正在使用将数据发送到你的PHP脚本代码**?有了这些信息,我们可以向您展示如何使用PHP发送邮件。 – Charles 2011-03-25 21:12:02
感谢那个片段,但我们需要更多。 “allvars”里面有什么?这是将发送到脚本的数据,我们需要知道有哪些内容可以帮助您撰写邮件。 – Charles 2011-03-25 22:40:29
从你的意见看来,你有你的动作代码以及你的PHP代码,你只是不知道他们是如何一起工作的?你将需要把你的PHP脚本放在服务器上,然后将URLRequest指向它。 var mailAddress:URLRequest = new URLRequest(“http:// mydomain.com/mySimpleSampleMessage.php”); – 2011-03-26 14:38:39