Aight im trying to get this mailer to work (from the flash mx 2004 bible) but now i need it to be php instead of asp and im not much good with either.
Basically on the first frame of the flash file there is this function:
function sendComments() {
var sender:LoadVars = new LoadVars();
var responder:LoadVars = new LoadVars();
var scriptURL:String = "sendmail.asp";
responder.onLoad = function(success){
if (success) {
_root.gotoAndStop("output");
} else {
_root.gotoAndStop("error");
}
};
sender.fromEmail = fromEmail_txt.text;
sender.fromName = fromName_txt.text;
sender.body = name.text & "
" & phone.text & "
" & email.text & "
" & preferredRad.selection.data & "
" & comments.text;
sender.sendAndLoad(scriptURL, responder, "POST");
_this.gotoAndStop("wait");
}
this._lockroot = true;
Then there is a listener on the input frame:
submit.addEventListener("click", this.sendComments);
reset.addEventListener("click", this.resetFields);
stop();
So that when a user clicks on the submit button the function sendcomments runs and the script should be sent. When it’s sent it goes to the frame labeled wait and then either the error frame or output frame if everything works.
The asp code for the mailer is:
<%
smtpServer = "203.22.204.85"
smtpPort = 25
' ---
dim smtpServer, smtpPort
Set message = CreateObject ("JMail.Message")
'message.ServerAddress = smtpServer & ":" & smtpPort
message.From = Request.Form("fromEmail")
message.FromName = Request.Form("fromName")
message.Subject = "Apropos Designing"
message.AddRecipient "[EMAIL="jphillips@norcaldesigns.com"]jphillips@norcaldesigns.com[/EMAIL]", "Jesse Phillips"
message.ContentType = "text/plain"
message.ISOEncodeHeaders = false
message.ContentTransferEncoding = "8bit"
message.Body = Request.Form("body")
' 1 - highest priority (Urgent) ' 3 - normal ' 5 - lowest
message.Priority = 3
' Add sender's IP address (not required, but useful for web-based emessage)
'message.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")
'Send the e-mail
message.Send(smtpServer & ":" & smtpPort)
'Response.write "success=1&timeDate=" & Server.URLEncode(message.Date) & "&end=1"
set message = nothing
%>
here are the files:
(website link removed)
www.norcaldesigns.com
Roseville Website Design.