Formamail Problem
Formamail Problem
Hi!
When visitors send a contact form, get a confirmation message, but I(recipient) had never received any email.
Here are my codes:
IT|name|1|Name: |40,100||300
IT|email|1|Email: |40,100||300
SM|subject|0|Subject: |20,100|help#theme problem#presales#installation#contact|300
TA|info|0|Info: |20,5||300
IH|redirect|0||10,100|http://www.mysite.com/index.php?id=11,0,0,1,0,0|0
IH|redirect_error|0||10,100|http://www.mysite.com/index.php?id=12,0,0,1,0,0|0
IH|language|0||10,100|EN|0
IH|send_copy|0||10,100|1|0
Help!!!
When visitors send a contact form, get a confirmation message, but I(recipient) had never received any email.
Here are my codes:
IT|name|1|Name: |40,100||300
IT|email|1|Email: |40,100||300
SM|subject|0|Subject: |20,100|help#theme problem#presales#installation#contact|300
TA|info|0|Info: |20,5||300
IH|redirect|0||10,100|http://www.mysite.com/index.php?id=11,0,0,1,0,0|0
IH|redirect_error|0||10,100|http://www.mysite.com/index.php?id=12,0,0,1,0,0|0
IH|language|0||10,100|EN|0
IH|send_copy|0||10,100|1|0
Help!!!
Hello Goran
The Problem is known (i hope that was right).
you can read in these thread, but these thrad is in german
http://www.phpwcms.de/forum/viewtopic.php?t=285
it looks like it only happens on several webspaces.
so we hope the oliver can fix it!
Pappnase
The Problem is known (i hope that was right).
you can read in these thread, but these thrad is in german
http://www.phpwcms.de/forum/viewtopic.php?t=285
it looks like it only happens on several webspaces.
so we hope the oliver can fix it!
Pappnase
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Hello Oliver
I tryed it one more time and installed the phpwcms release from 12.11.03 then tested the formailer. it works fine but when i upload the patch from 14.11.03 the reciepent error happens.
now i updatet zu last release and after that i upload the old act_formmailer.php from 14.11.2003 and both works. the recipent mail and the copy would be send.
Greets
Pappnase
I tryed it one more time and installed the phpwcms release from 12.11.03 then tested the formailer. it works fine but when i upload the patch from 14.11.03 the reciepent error happens.
now i updatet zu last release and after that i upload the old act_formmailer.php from 14.11.2003 and both works. the recipent mail and the copy would be send.
Greets
Pappnase
Hello Oliver,
I took a look at the act_formmailer.php (the old and the new) and found at line 83 to 93 the following code:
[code]//send copy to form sender
if(isset($_POST["send_copy"])) {
if(intval($_POST["send_copy"])) {
$send_copy_to = trim($_POST["email"]);
if(MailVal($send_copy_to, 2)) {
$form_error[300] = $translate[$lang]["error300"];
unset($send_copy_to);
}
}
unset($_POST["send_copy"]);
}
[/code]
In the middle where you find: "if(MailVal($send_copy_to, 2)) {" should there be a "1" instead the "2"? I remember, that I place in the form a hidden value of "1" for sending to the formsender, or do I think wrong?
I took a look at the act_formmailer.php (the old and the new) and found at line 83 to 93 the following code:
[code]//send copy to form sender
if(isset($_POST["send_copy"])) {
if(intval($_POST["send_copy"])) {
$send_copy_to = trim($_POST["email"]);
if(MailVal($send_copy_to, 2)) {
$form_error[300] = $translate[$lang]["error300"];
unset($send_copy_to);
}
}
unset($_POST["send_copy"]);
}
[/code]
In the middle where you find: "if(MailVal($send_copy_to, 2)) {" should there be a "1" instead the "2"? I remember, that I place in the form a hidden value of "1" for sending to the formsender, or do I think wrong?
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Hello Oliver,
I tried the following changes in act_formmailer.php at line 202 to 205:
[code] if(!ini_get('safe_mode')) {
//mail($recipient, $subject, $body, $from, "-f ".$from);
mail($recipient, $subject, $body, $from);
mail($from, $subject, $body, $from);
[/code]
Now I get three Mails:
1. Mail shows from = sendermailaddress -> to = receipientmailaddress
2. Mail shows from = receipientmailaddress -> to = sendermailaddress
3. Mail shows from = sendermailaddress -> to = FROM:sendermailaddress
Should it be so as I wrote? Is the Code ok or should have to change anywhere else?
I tried the following changes in act_formmailer.php at line 202 to 205:
[code] if(!ini_get('safe_mode')) {
//mail($recipient, $subject, $body, $from, "-f ".$from);
mail($recipient, $subject, $body, $from);
mail($from, $subject, $body, $from);
[/code]
Now I get three Mails:
1. Mail shows from = sendermailaddress -> to = receipientmailaddress
2. Mail shows from = receipientmailaddress -> to = sendermailaddress
3. Mail shows from = sendermailaddress -> to = FROM:sendermailaddress
Should it be so as I wrote? Is the Code ok or should have to change anywhere else?
My little contribution...
Run for me like this
from : emailfromuser
recipient : my contact adress
if(isset($send_copy_to)) {
$from = "From: ".$send_copy_to."\n";
mail($send_copy_to, $subject, $body, "From: ".$recipient."\n", "-f ".$recipient);
} else {
$from .= "From: ".$email."\n";
}
mail($recipient, $subject, $body, $from);
from : emailfromuser
recipient : my contact adress
if(isset($send_copy_to)) {
$from = "From: ".$send_copy_to."\n";
mail($send_copy_to, $subject, $body, "From: ".$recipient."\n", "-f ".$recipient);
} else {
$from .= "From: ".$email."\n";
}
mail($recipient, $subject, $body, $from);
Hello Goran
upload the latest formmailer script an change it like
Adrinano discribe in his thread!!
http://www.phpwcms.de/forum/viewtopic.php?t=426
Greets
Pappnase[/url]
upload the latest formmailer script an change it like
Adrinano discribe in his thread!!
http://www.phpwcms.de/forum/viewtopic.php?t=426
Greets
Pappnase[/url]