Cemondra
12-20-2005, 10:47 AM
My Problem:
I have a Flash Mail form, contact.swf, at SiteA that won't send me mail via SiteBmailer.php at SiteB
This is my SiteBmailer.php
<?php
$name = $_POST['sender'];
$mail = $_POST['email'];
$recipient = "mytest@test.com";
$message = "SiteA Visitor says:\n" . stripslashes($_POST['entry']);
$header = "From: $name <$mail>\n";
mail($recipient , stripslashes($_POST['subject']), $message, $header);
?>
This is Send button ActionScript
on (release){
if((subject == "") (sender == "")|| (entry == "") || (email == "")){
mailStatus = "Please enter information in all fields!"
stop();
} else{
lineSkip(); //Convert \r to \n for PHP
loadVariablesNum("http://www.SiteB.com/SiteBmailer.php", 0, "POST");
mailStatus = "Message has been sent!"
gotoAndStop (2);
}
}
The following works at SiteB, but not SiteA. However, forms needs to be at SiteA
<?php
mail("mytest@test.com", "Test Subject", "Test Message");
?>
This is what causes me to scratch my head:
I upload php to SiteB.
Browsing directly to SiteB.com/SiteBmailer.php will sends me a blank email.... That works, I assume php is fine.
Using the Form from my Hard Drive with Flash Player sends me a email... That Works, I assume actionscript/swf is fine.
With php at SiteB and Form at SiteA. I use form at SiteA but I DON'T get any email. I assume I need to setup cross-domain, but wait...
With php and Form at SiteB. I use form at SiteB but I DON'T get any email, even though swf and php in same domain.
I feel like my php and swf are coded fine, but what's missing? Any Help?
I have a Flash Mail form, contact.swf, at SiteA that won't send me mail via SiteBmailer.php at SiteB
This is my SiteBmailer.php
<?php
$name = $_POST['sender'];
$mail = $_POST['email'];
$recipient = "mytest@test.com";
$message = "SiteA Visitor says:\n" . stripslashes($_POST['entry']);
$header = "From: $name <$mail>\n";
mail($recipient , stripslashes($_POST['subject']), $message, $header);
?>
This is Send button ActionScript
on (release){
if((subject == "") (sender == "")|| (entry == "") || (email == "")){
mailStatus = "Please enter information in all fields!"
stop();
} else{
lineSkip(); //Convert \r to \n for PHP
loadVariablesNum("http://www.SiteB.com/SiteBmailer.php", 0, "POST");
mailStatus = "Message has been sent!"
gotoAndStop (2);
}
}
The following works at SiteB, but not SiteA. However, forms needs to be at SiteA
<?php
mail("mytest@test.com", "Test Subject", "Test Message");
?>
This is what causes me to scratch my head:
I upload php to SiteB.
Browsing directly to SiteB.com/SiteBmailer.php will sends me a blank email.... That works, I assume php is fine.
Using the Form from my Hard Drive with Flash Player sends me a email... That Works, I assume actionscript/swf is fine.
With php at SiteB and Form at SiteA. I use form at SiteA but I DON'T get any email. I assume I need to setup cross-domain, but wait...
With php and Form at SiteB. I use form at SiteB but I DON'T get any email, even though swf and php in same domain.
I feel like my php and swf are coded fine, but what's missing? Any Help?