Page 1 of 2

PHP Email form not sending mail to recipient

Posted: Sat 14. Feb 2004, 01:03
by mdgroot
Does someone know the solution for this ?
I setup a complete email form, filled in the recipient e.g. but no email is being send ....

marc

update; The person who is filling out the form IS receiving a copy of the email. I'm, however, receiving no mail.

Posted: Sat 14. Feb 2004, 08:08
by Pappnase
hello mdgroot!

sorry but please search again for "formmailer, formmail i ithink there was as thread!

Pappnase

Posted: Sat 14. Feb 2004, 10:08
by mdgroot
Hi Pappnase,

Yes, I did find a lot of info about this, but bo solution to the problem ..

Marc

Posted: Sat 14. Feb 2004, 10:32
by Denis Parshutin
so I fix this.

act_formmailer.php
Line 196

if(isset($send_copy_to)) {
$from = "From: ".$send_copy_to."\n";
if(!ini_get('safe_mode')) {
mail($send_copy_to, $subject, $body, "From: ".$recipient."\n", "-f ".$recipient);
} else {
mail($send_copy_to, $subject, $body, "From: ".$recipient."\n");
}
} else {
$from = "From: ".$send_copy_to."\n";
}
if(!ini_get('safe_mode')) {
mail($recipient, $subject, $body, "From: ".$send_copy_to."\n", "-f ".$send_copy_to);
} else {
mail($recipient, $subject, $body, $from);
}


Thats all.

Posted: Sat 14. Feb 2004, 11:09
by mdgroot
I have tried this. But I still don't receive a mail.
The person who did fill in his email did receive the mail however ... :cry:

Posted: Sat 14. Feb 2004, 11:10
by Oliver Georgi
The problem is based on register_globals=On

Search this forum - there is a link to small patch for this.

I will release a new patch file this evening.

regards
Oliver

Posted: Mon 16. Feb 2004, 01:37
by mdgroot
Hi,

I installed the new patch (15/2).
But my form is still not sending me a mail.... :(

This is my form, just a standard one;
IT|naam|1|Naam: |40,100||200
IT|adres|0|Adres: |40,100||200
IT|postcode|0|Postcode: |10,100||200
IT|woonplaats|0|Woonplaats: |40,100||200
IT|email|0|Email: |40,100||200
TA|opmerkingen|0|Opmerkingen: |40,7||300
IH|language|0||10,100|NL|0

name, address, zip, location, email, remarks.

if someone fills it in, the email is send ... the succes page is shown.
But I never receive any mail ...

Posted: Mon 16. Feb 2004, 09:16
by Oliver Georgi
sometimes spam filters are cause this.

You also need the send copy hidden field.

Posted: Mon 16. Feb 2004, 09:22
by mdgroot
Goodmorning

I don't get it. If I have the send copy field added, then there is a mail being send to the person who filled in the form. But still not not me....

I do not have any spamfilters.
And the address which I use to fill in the form to test is on the same computer/provider.

I really don't get it...

Posted: Mon 16. Feb 2004, 09:32
by Oliver Georgi
If the person who has filled the form in gets an email - you should also get one. Check if it works if you use another mail address - maybe outside of your mailserver.

Oliver

Posted: Mon 16. Feb 2004, 09:35
by mdgroot
I tried that also, a complete different mail address, other mailserver.
no solution.... strange

btw; I have tried other emailforms/mailers before this and they are all working without any problem ....

Posted: Mon 16. Feb 2004, 09:44
by Oliver Georgi
I don't know if this is possible for you - but maybe try to change the code at line 207 in act_formmailer.php as this:

Code: Select all

	if(isset($send_copy_to)) {
		$from = "From: ".$send_copy_to."\n";
		if(!ini_get('safe_mode')) {
			mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\n".$content_type);
		} else {
			mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\n".$content_type);
		}
	} else {
		$from = "From: ".$recipient."\n";
	}
	if(!ini_get('safe_mode')) {
		mail($recipient, $subject_encoded, $body, $from.$content_type);
	} else {
		mail($recipient, $subject_encoded, $body, $from.$content_type);
	}
...and tell me what happens (the -f attribut is removed here).

Olier

Posted: Mon 16. Feb 2004, 09:47
by StefanR
mdgroot wrote:btw; I have tried other emailforms/mailers before this and they are all working without any problem ....
Hmm then use an other form if there were no problems.... :P

Posted: Mon 16. Feb 2004, 10:01
by mdgroot
Tried.. no difference. The person who filled in the form is receiving a mail. The recipient (myself) is not...

@StefanR; I could do that, bu I like the fact that formmailer is built-in, and btw, this formmailer is very easy to configure :wink:

Posted: Mon 16. Feb 2004, 10:12
by Oliver Georgi
Temporarily can you try to change this:

Code: Select all

if(!ini_get('safe_mode')) { 
      mail($recipient, $subject_encoded, $body, $from.$content_type); 
   } else { 
      mail($recipient, $subject_encoded, $body, $from.$content_type); 
   }
into

Code: Select all

if(!ini_get('safe_mode')) { 
      mail($recipient, $subject_encoded, $body, $from); 
   } else { 
      mail($recipient, $subject_encoded, $body, $from); 
   }
Oliver