PDA

View Full Version : Simple email from flash.



substance
July 29th, 2008, 06:01 PM
I set up a very simple version, but it's still not sending me an email.

FLASH:

var varSend:URLRequest = new URLRequest("email_parse.php");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;

varLoader.load(varSend);



email_parse.php:
<?

$to = "XXX@gmail.com";
$from = "XXX@yahoo.com";
$msg = "this is the message";
$subject = "this is the subject";
mail($to, $subject, $msg, "From: me\nReply-To: $from\n");

?>

It is my understanding that the problem could be that my server isnt setup for emailing through php. If so, is there a way to check this?

webbhelp
July 29th, 2008, 06:33 PM
in php.ini, press ctrl + f to search after a word mail and I think you find everything there

saxx
July 29th, 2008, 06:37 PM
<?php

phpinfo ();

?>
run that php file

search the terms involved, if your on a free host its possible they don't allow the mail function and if your not, get a new host.

The free host i use for my cleint demos is
http://www.000webhost.com/

and i often use this for contact forms

http://www.developphp.com/Flash_tuts/Vids/Contact_form_AS3/

substance
July 29th, 2008, 07:35 PM
<?php

phpinfo ();

?>
run that php file


Interesting, I made a file with exactly that, named it checker.php and ran it on my server and it returned :

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/13/d178022853/htdocs/Brooke/checker.php on line 2

Parse error: syntax error, unexpected T_STRING in /homepages/13/d178022853/htdocs/Brooke/checker.php on line 2

Could it have anything to do with the fact that im editing/saving using wordpad?

substance
July 29th, 2008, 07:38 PM
Could it have anything to do with the fact that im editing/saving using wordpad?

Got it, I guess saving it using wordpad adds some funky formating. Saved using notepad and it worked fine.

saxx
July 29th, 2008, 07:39 PM
You must have been using a wierd charset or something