Hi I have installed the form generater and everything is working fantastic. I have one problem however.when recieving an email form a person who filled out the form on my website. i always get in my outlook expres in box in the "from" firld my email address. I would like to see the senders e mail address in the "from" field in outlook express. What can I do to achieve that. Kind Regards Hanno Coetzee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Talk about confusing, you have jumped in on a post and have not explained what your problem is or what your are attempting to do.
What code is confusing? What are you trying to do? What syntax error are you getting?
phpFormgen works fine if it has not been modified, so errors you get are probably due to your syntax errors in your custom code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to make emails be received by the person who send the form, rather than from the server.
Tried another stab at your solution, before i was inserting the
$header = "From: ". $Name . " <" . $email . ">
into the wrong section. I have in the correct section and seems to be working, but now when i send form i get a warning on the "thank you" page. My code looks like this. (replaced recipient email for security)
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {mail("email@email.com","Contacto Verde",
"Form data:
Nombre: " . $_POST['field_1'] . "
Empresa: " . $_POST['field_2'] . "
Telefono oh Email: " . $_POST['field_3'] . "
Pais / Ciudad: " . $_POST['field_4'] . "
Mensaje: " . $_POST['field_5'] . "
",$header = "From: ". $_POST['field_1'] . " <" . $_POST['field_3'] . ">");
include("grazie.php");
}
else {
echo "<br><br>El codigo de seguridad no es valido.<br>
Vuelva a su mensaje e intentelo de nuevo. Para mayor comodidad, abajo esta su mensaje.<br>
Usted podria perderlo al regresar, de manera que copielo para poder ponerlo de nuevo en la casilla.<br><br><i>
" . $_POST['field_5'] . "</i>";
}
?>
This is the warning message
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /PATH/processor.php:5) in /PATH/processor.php on line 6
Line 5 is
session_start();
Line 6 is
if( ($_SESSION....etc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I have installed the form generater and everything is working fantastic. I have one problem however.when recieving an email form a person who filled out the form on my website. i always get in my outlook expres in box in the "from" firld my email address. I would like to see the senders e mail address in the "from" field in outlook express. What can I do to achieve that. Kind Regards Hanno Coetzee
There are many posts on this issue. I usually point people to
http://www.php.net/mail
or some other equivalent php learning site.
See this post:
@Crusiatus Black
23-May-2008 05:00
Code below works without errors
<?php
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
?>
your code is confusing, because phpformgen uses sessions to verify,then send. will keep working on it, or if you have some advice will help.
I'm placing
$header = "From: ". $Name . " <" . $email . ">
right before the mail function, but get syntax error
Talk about confusing, you have jumped in on a post and have not explained what your problem is or what your are attempting to do.
What code is confusing? What are you trying to do? What syntax error are you getting?
phpFormgen works fine if it has not been modified, so errors you get are probably due to your syntax errors in your custom code.
I am trying to make emails be received by the person who send the form, rather than from the server.
Tried another stab at your solution, before i was inserting the
$header = "From: ". $Name . " <" . $email . ">
into the wrong section. I have in the correct section and seems to be working, but now when i send form i get a warning on the "thank you" page. My code looks like this. (replaced recipient email for security)
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {mail("email@email.com","Contacto Verde",
"Form data:
Nombre: " . $_POST['field_1'] . "
Empresa: " . $_POST['field_2'] . "
Telefono oh Email: " . $_POST['field_3'] . "
Pais / Ciudad: " . $_POST['field_4'] . "
Mensaje: " . $_POST['field_5'] . "
",$header = "From: ". $_POST['field_1'] . " <" . $_POST['field_3'] . ">");
include("grazie.php");
}
else {
echo "<br><br>El codigo de seguridad no es valido.<br>
Vuelva a su mensaje e intentelo de nuevo. Para mayor comodidad, abajo esta su mensaje.<br>
Usted podria perderlo al regresar, de manera que copielo para poder ponerlo de nuevo en la casilla.<br><br><i>
" . $_POST['field_5'] . "</i>";
}
?>
This is the warning message
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /PATH/processor.php:5) in /PATH/processor.php on line 6
Line 5 is
session_start();
Line 6 is
if( ($_SESSION....etc
you can disregard my warning error question, i figure it out
thank you