Page 1 of 1
Formamail Problem
Posted: Tue 2. Dec 2003, 20:22
by Goran
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!!!
Posted: Sat 6. Dec 2003, 10:01
by Pappnase
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
Posted: Sat 6. Dec 2003, 13:26
by Oliver Georgi
I have no workaround for that problem - I will change the mail() function for using php mailer class which implements more compatible mail functions - also for using external smtp servers.
Maybe your account is able to send only 1 mail per script. On all of my servers this is working.
Oliver
Posted: Fri 12. Dec 2003, 06:35
by Pappnase
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
Posted: Fri 12. Dec 2003, 16:06
by adriano
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?
Posted: Fri 12. Dec 2003, 16:16
by Oliver Georgi
Sorry, you are wrong. This is only the level of email checking.
Posted: Fri 12. Dec 2003, 18:56
by adriano
Ok, I found in my mailserver log the following error:
[code]postfix/sendmail[2755]: fatal: cannot handle command-line recipients with -t[/code]
Do you have any idea, how to fix this?
By the way: This is a Postfix-Maiserver under Mac OS X 10.3.
Posted: Fri 12. Dec 2003, 19:18
by adriano
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?
My little contribution...
Posted: Tue 16. Dec 2003, 12:57
by raoulx
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);
Posted: Fri 19. Dec 2003, 01:31
by Goran
Hello Oliver,
this is realy strange, i upload the old act_formmailer.php from 10.11.2003 and everything works. The recipent mail and the copy would be send.
Posted: Sat 20. Dec 2003, 09:25
by Pappnase
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]