PHP Email form not sending mail to recipient

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

PHP Email form not sending mail to recipient

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

Post by Pappnase »

hello mdgroot!

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

Pappnase
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post by mdgroot »

Hi Pappnase,

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

Marc
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post 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.
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post 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:
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post 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 ...
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

sometimes spam filters are cause this.

You also need the send copy hidden field.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post 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...
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post 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 ....
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
StefanR
Posts: 78
Joined: Thu 12. Feb 2004, 16:11
Location: Rostock

Post 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
mdgroot
Posts: 155
Joined: Wed 11. Feb 2004, 17:47
Location: Netherlands

Post 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:
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Post Reply