Jump to content

Php mail () function?!


wednesdayaddams

Recommended Posts

Can anyone help me  :'(

 

I have some php to use alongside a contact form created with flash and actionscript.

 

However, I am not recieving the emails as safe mode is 'on' and my host does not turn it 'off' for security reasons.

Apparently I can use the php mail () function? Or send the form with html?!

 

Here is my Php... Any help would be greatly appreciated as I am fairly new to this  :D

 

<?php

$userEmail = $_POST['the_email'];

$to = $userEmail . ",[email protected]";

$subject = $_POST['the_subject'];

$message = "Name: ".$_POST['the_name'];

$message .= "\n".$_POST['the_message'];

mail ($to, $subject,$message);

?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/166086-php-mail-function/
Share on other sites


<?php
$userEmail = $_POST['the_email'];
$subject = $_POST['the_subject'];
$message = "Name: ".$_POST['the_name'];
$message .= "\n".$_POST['the_message'];
mail ("[email protected]", $subject, $message);
?>

when us use your variable $to it is coming out with two emails because you are using the variable $userEmail so it'll come out like this the way your doing it [email protected]@yahoo.com so try the code above.

Link to comment
https://forums.phpfreaks.com/topic/166086-php-mail-function/#findComment-875947
Share on other sites

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.