# Flash + ASP + Mailer to PHP

**URL:** https://forum.kirupa.com/t/flash-asp-mailer-to-php/150227
**Category:** programming
**Created:** [June 6, 2005, 1:57am UTC](https://forum.kirupa.com/t/flash-asp-mailer-to-php/150227 "2005-06-06T01:57:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![j\_polo9](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@j\_polo9](https://forum.kirupa.com/u/j_polo9)
#### Post date: [June 6, 2005, 1:57am UTC](https://forum.kirupa.com/t/flash-asp-mailer-to-php/150227/1 "2005-06-06T01:57:10Z")

</div>

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:

```auto
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:

```auto
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:

```auto
<%
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](http://www.norcaldesigns.com)  
Roseville Website Design.
