Jump to content

Sending email with PHP from Flash - having problems


Xero000

Recommended Posts

Hi I'm new to PHP and i'm trying to create a submit form ina flash doc and have php email that info to my account.  All the vars are passing to the php just fine as it displays in the echo...  i however can not for the life of me get the mail($sendto... function to work.  Could all you well versed in PHP help me out?  I'd very much appreciate it.  here's my code:

 

<?php

 

 

$sendto = '[email protected]';

$subject = ' test ';

 

$headers = "From: [email protected]";

$headers .= "Reply-To: " . $_POST["fromname"] . "\n\n";

$headers .= "Return-path: " . $_POST["fromemail"];

$message = $_POST["frommessage"];

 

mail($sendto,$subject,$message,$headers);

 

echo $sendto,$subject,$message,$headers

 

?>

How do you know its not sending?

 

<?php

$sendto = '[email protected]';
$subject = ' test ';

$headers = "From: [email protected]";
$headers .= "Reply-To: " . $_POST["fromname"] . "\n\n";
$headers .= "Return-path: " . $_POST["fromemail"];
$message = $_POST["frommessage"];

if (mail($sendto,$subject,$message,$headers)) {
  echo "mail called succesfully!";
} else {
  echo "Call to mail() failed";
}

?>

Yes, i've tried this.  It does echo 'call to mail() failed'

 

I'm fairly confused. I'm pretty sure it's coded correctly... but i could be wrong.  could it be a server issue?  Thoughts?

 

oh and i forgot to say i know it's not sending because I'm not receiving any emails.  it seems like the rest of the code is worknig.  just not mail()

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.