Formamail Problem

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Formamail Problem

Post 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!!!
:cry:
Pappnase

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Pappnase

Post 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
adriano
Posts: 165
Joined: Sun 16. Nov 2003, 15:24
Location: Bremerhaven
Contact:

Post 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?
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sorry, you are wrong. This is only the level of email checking.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
adriano
Posts: 165
Joined: Sun 16. Nov 2003, 15:24
Location: Bremerhaven
Contact:

Post 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.
adriano
Posts: 165
Joined: Sun 16. Nov 2003, 15:24
Location: Bremerhaven
Contact:

Post 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?
raoulx
Posts: 13
Joined: Fri 12. Dec 2003, 22:21

My little contribution...

Post 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);
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post 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.
:idea:
Pappnase

Post 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]
Post Reply