i have try some variations in my processor.php but it dosent work. I would like my real emailadress. At the moment when my user click reply in his outlook email he send it to CGI_MAILER - but i like to show my own email adress.(or alternate no repley)
Can anyone help me with this problem or have a better idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Silke <silke.xxxxxxx@xxxxx.de>' . "\r\n";
$headers .= 'From: IK Team <xxxxx@xxxxxx.de>' . "\r\n";
Your mail() command is misforrmed. You need the to, subject, message, and the headers all comma separated. You effectively only have two fields in the call you've supplied which mail() is taking as the to and subject.
From the PHP Mail() manual [1], the fields must be separated by a comma. You are not separating your fields with a comma and therefore mail() is treating
As the subject and since nothing follows it (did you cut off the end of your mail() command? You have a random " and no end bracket), no headers are added. You'll need to so something like:
now are alle headers in outlook ok but i must delete my all formfields.
i have over 100 in the final form. atm i have only a text for test ($message='TEXT TEXT TEXT TEXT';)
how can i get my results from all my field back to the confirming email?
normal its look so: (its only a part)
mail("xxxxxxx@xxxxxx.de","Anfrage: $subject - $datum - $veranstaltungsort // Besteller: $bestellernachname/$bestellervorname $anrede // Tel: $telefon","
--------------------------------------------------------------
UEBERMITTELTE FORMULARDATEN
--------------------------------------------------------------
hello,
have anyone a idea how can i change this?
http://www.unrealbase.de/images/absender.jpg
i have try some variations in my processor.php but it dosent work. I would like my real emailadress. At the moment when my user click reply in his outlook email he send it to CGI_MAILER - but i like to show my own email adress.(or alternate no repley)
Can anyone help me with this problem or have a better idea ?
Look for this text
"Example #2 Sending mail with extra headers."
on this site
http://www.php.net/manual/en/function.mail.php
You should be able to set the from email to anything you want.
hmn i have add some code but it shows CGI Mailer again
here my code (a part)
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
$subject=$_POST['field_7'];
$datum=$_POST['field_12'];
$bestellernachname=$_POST['field_3'];
$bestellervorname=$_POST['field_4'];
$anrede=$_POST['field_1'];
$frommail=$_POST['field_5'];
$headers .= "Absender: " . $frommail . "\r\n";
$veranstaltungsort=$_POST['field_9'];
$telefon=$_POST['field_6'];
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Silke <silke.xxxxxxx@xxxxx.de>' . "\r\n";
$headers .= 'From: IK Team <xxxxx@xxxxxx.de>' . "\r\n";
// Checkbox handling
$field_109_opts = $_POST['field_109'][0].",". $_POST['field_109'][1].",". $_POST['field_109'][2].",". $_POST['field_109'][3];
$field_110_opts = $_POST['field_110'][0].",". $_POST['field_110'][1].",". $_POST['field_110'][2].",". $_POST['field_110'][3];
mail("xxxxxx@xxxx.de","Anfrage: $subject - $datum - $veranstaltungsort // Besteller: $bestellernachname/$bestellervorname $anrede // Tel: $telefon $headers","
and so looks my outlook email:
http://www.unrealbase.de/images/absender%202.jpg
you see again CGI mailer in Field from
hmnn i have idea whats wrong
Your mail() command is misforrmed. You need the to, subject, message, and the headers all comma separated. You effectively only have two fields in the call you've supplied which mail() is taking as the to and subject.
From the PHP Mail() manual [1], the fields must be separated by a comma. You are not separating your fields with a comma and therefore mail() is treating
"Anfrage: $subject - $datum - $veranstaltungsort // Besteller: $bestellernachname/$bestellervorname $anrede // Tel: $telefon $headers"
As the subject and since nothing follows it (did you cut off the end of your mail() command? You have a random " and no end bracket), no headers are added. You'll need to so something like:
mail("xxxxxx@xxxx.de","Anfrage: $subject - $datum - $veranstaltungsort // Besteller: $bestellernachname/$bestellervorname $anrede // Tel: $telefon $headers",$headers);
You may also have to add a comma between your two headers, I'm not sure as I have never used more than one header before.
OOps - the reference:
[1]:http://ca.php.net/function.mail
ok i have understand a little bit - thx for your response
i have change my code in processor so:
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
$subject=$_POST['field_7'];
$datum=$_POST['field_12'];
$bestellernachname=$_POST['field_3'];
$bestellervorname=$_POST['field_4'];
$anrede=$_POST['field_1'];
$veranstaltungsort=$_POST['field_9'];
$telefon=$_POST['field_6'];
$to .= 'xxxx.xxxxx@xxxxxx.de';
$message='TEXT TEXT TEXT TEXT';
// Additional headers
$headers .= 'To: Silke <xxxxxx.xxxxx@xxxxx.de>' . "\r\n";
$headers .= 'From: IK Team <xxxxx@xxxxx.de>' . "\r\n";
// Checkbox handling
$field_109_opts = $_POST['field_109'][0].",". $_POST['field_109'][1].",". $_POST['field_109'][2].",". $_POST['field_109'][3];
$field_110_opts = $_POST['field_110'][0].",". $_POST['field_110'][1].",". $_POST['field_110'][2].",". $_POST['field_110'][3];
mail($to, $subject, $message, $headers,);
include("confirm.html");
?>
now are alle headers in outlook ok but i must delete my all formfields.
i have over 100 in the final form. atm i have only a text for test ($message='TEXT TEXT TEXT TEXT';)
how can i get my results from all my field back to the confirming email?
normal its look so: (its only a part)
mail("xxxxxxx@xxxxxx.de","Anfrage: $subject - $datum - $veranstaltungsort // Besteller: $bestellernachname/$bestellervorname $anrede // Tel: $telefon","
--------------------------------------------------------------
UEBERMITTELTE FORMULARDATEN
--------------------------------------------------------------
--------------------------------------------------------------
BESTELLER DATEN
Anrede: " . $_POST['field_1'] . "
Titel: " . $_POST['field_2'] . "
Nachname: " . $_POST['field_3'] . "
Vorname: " . $_POST['field_4'] . "
E-Mail: " . $_POST['field_5'] . "
Telefon: " . $_POST['field_6'] . "
Tagungsname: " . $_POST['field_7'] . "
Tagungsnummer: " . $_POST['field_8'] . "
Standort: " . $_POST['field_9'] . "
Sonstiges: " . $_POST['field_10'] . "
--------------------------------------------------------------
...........
Hi,
Just add all your fields to the $message variable before sending. Something like:
$message ="nrede: " . $_POST['field_1'] . "\n
Titel: " . $_POST['field_2'] . " \n
Nachname: " . $_POST['field_3'] . " \n
Vorname: " . $_POST['field_4'] . " \n
E-Mail: " . $_POST['field_5'] . " \n
Telefon: " . $_POST['field_6'] . " \n
Tagungsname: " . $_POST['field_7'] . " \n
Tagungsnummer: " . $_POST['field_8'] . " \n
Standort: " . $_POST['field_9'] . " \n
Sonstiges: " . $_POST['field_10'] . "
Then make your call
mail($to, $subject, $message, $headers,);