Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-20-2006, 11:58 PM   #1
Rachel Ann
Registered User
 
Join Date: May 2006
Posts: 45
Default Send e-mail with ASP-take two

Okay here we go. Scratch what I asked about PHP earlier. I got my people to change the server. Now I have a different problem. And this is so confusing.

So we (Cota) got the ASP and AS to work last time with the server I was testing on. This is what is happening now:

I click send, and it say "Email sent" in the status box (so it reads the ASP) but it doesn't send the e-mails.

So you may be thinking...oh, well the new server has a problem with the ASP. But, I tried the the simple tuturial flash and it works...on the exact same ASP file in the exact same location.

So then I thought maybe the AS wasn't working right, but nope. If you direct it towards the first server I used it works. AND when I put the exact same AS in my flash file into the tutorial file, it sends the e-mail.

So it seems as if the ASP file works and the AS works, but not together on the new server.

Does this make sense? What in the world is going on here?

Here is what I am using:

AS:

//Create a loadvars object named email_lv
var email_lv = new LoadVars();

//this function is called when email_lv loads the server-side script.
email_lv.onLoad = function(success) {
//If the script was successfully loaded, this condition is run
if (success) {


if (email_lv.server_mes == "ok") {

status_txt.text = "Email Sent";

}
} else {
//email failed to send, but script did load. Likely a server issue.
status_txt.text = "Email Failed";
}
};


submit_btn.onRelease = function() {


if (!email_txt.length || email_txt.indexOf("@") == -1 || email_txt.indexOf(".") == -1) {
status_txt.text = "Invalid Email.";

//This validates the subject line contains text
} else if (!name_txt.length) {
status_txt.text = "Missing Name";

//This validates the message body contains text
} else if (!phone_txt.length) {
status_txt.text = "Missing Phone";


} else if (!message_txt.length) {
status_txt.text = "Missing Message";


} else {

email_lv.email_txt = email_txt.text;
email_lv.name_txt = name_txt.text;
email_lv.phone_txt = phone_txt.text;
email_lv.message_txt = message_txt.text;

email_lv.sendAndLoad("http://www.thehousenlr.com/SendMail.asp", email_lv, "POST");
}
};
stop();


ASP:


<%
dim themail, thename, themessage, i

'Gets the incoming variables from flash
themail = Request("email_txt")
thename = Request("name_txt")
thephone = Request("phone_txt")
themessage = Request("message_txt")

'Decalre and create email object
dim objmail

set objmail = Server.CreateObject("CDONTS.Newmail")
'error handler, if error encountered, ignore it and proceed
On Error resume next

'build the email using the variables from flash
objmail.From = themail
objmail.To = "[email protected]"
objmail.Subject = "Email from thehouse website"
objmail.Body = "The following is a message from " & thename & " (phone number " & thephone & ") from thehouse website: " &themessage
objmail.Send
'error handler, if error encountered, ignore it and proceed
On Error resume next

'If any errors were encounter then run this code
If Err.Number <> 0 then
'tells flash ASP failed and terminates the ASP file.
Response.Write "&server_mes=fail"
Response.End
else
'Send message back to flash saying everything was ok.
Response.Write "&server_mes=ok"
End if

%>
Rachel Ann is offline   Reply With Quote
Old 08-21-2006, 12:26 AM   #2
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

Same thing as before..have you checked the spam box..
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 08-21-2006, 12:29 AM   #3
Rachel Ann
Registered User
 
Join Date: May 2006
Posts: 45
Default

yep, i checked it. it's not in the spam box.

Last edited by Rachel Ann; 08-21-2006 at 01:34 AM.
Rachel Ann is offline   Reply With Quote
Old 08-21-2006, 01:44 AM   #4
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

In the ASP file, hard code the values and run the ASP file on the server..see if it send the email..
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 08-21-2006, 01:56 AM   #5
Rachel Ann
Registered User
 
Join Date: May 2006
Posts: 45
Default

do you mean like, put in a name instead of using the variable thename?

i know that the asp works on the server...it has sent an e-mail when i used the tutorial swf.
Rachel Ann is offline   Reply With Quote
Old 08-21-2006, 02:01 AM   #6
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

Yes, hard code the values...then hit the file directly.
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 08-21-2006, 02:05 AM   #7
Rachel Ann
Registered User
 
Join Date: May 2006
Posts: 45
Default

it sent an e-mail.
Rachel Ann is offline   Reply With Quote
Old 08-21-2006, 02:07 AM   #8
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

hmm...ok...are we sure all the values are getting to the ASP script?
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 08-21-2006, 02:10 AM   #9
Rachel Ann
Registered User
 
Join Date: May 2006
Posts: 45
Default

how do i find that out?

the server sends back a response that makes the status field change to e-mail sent...?

the exact AS works when i copy and past into your tutorial. and it works when change it to look at the ASP from the other server that we got to work last time.

the only thing i did was move everything to the new server...which apparently likes my ASP still but doesn't like my swf and ASP to work together.
Rachel Ann is offline   Reply With Quote
Old 08-21-2006, 02:15 AM   #10
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

Set it all back to the original code in the ASP, basically undoing the hard code values....Now, change it to this

Response.Write "&server_mes=ok"
Response.Write "&mail_mes="&themail

and add that mail_mes to the statusbox in flash.
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ways to send HTML mail messages w/ flash gimbras Other Flash General Questions 4 05-17-2005 10:09 AM
Still At It .. trying to send mail talytech Server-Side Scripting 4 06-03-2004 05:48 PM
send mail function from a localhost in php kosie79 Server-Side Scripting 2 03-10-2004 03:30 AM
Send Mail Tutorial uk_martin ActionScript 1.0 (and below) 6 08-19-2003 11:07 AM
Help with tutorial Send Mail - Flash and PHP Dozey Server-Side Scripting 1 03-23-2002 06:04 PM


All times are GMT. The time now is 04:34 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.