PHP Email form not sending mail to recipient
- Oliver Georgi
- Site Admin
- Posts: 9949
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
Yep. I changed line 217 to (according to your last post);
Code: Select all
if(!ini_get('safe_mode')) {
mail($recipient, $subject_encoded, $body, $from);
} else {
mail($recipient, $subject_encoded, $body, $from);
}
- Oliver Georgi
- Site Admin
- Posts: 9949
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
Maybe additional headers are the problem or the "\n" has to be "\r\n" or "\n\r" on your system. Sometimes it is.
You can try this:
You can try this:
Code: Select all
if(isset($send_copy_to)) {
$from = "From: ".$send_copy_to."\r\n";
if(!ini_get('safe_mode')) {
mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\r\n".$content_type."\r\n");
} else {
mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\r\n".$content_type."\r\n");
}
} else {
$from = "From: ".$recipient."\r\n";
}
if(!ini_get('safe_mode')) {
mail($recipient, $subject_encoded, $body, $from.$content_type."\r\n");
} else {
mail($recipient, $subject_encoded, $body, $from.$content_type."\r\n");
}- Oliver Georgi
- Site Admin
- Posts: 9949
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
Mail Problem
For your information, this code sorted the problem for me.
Oliver Georgi wrote:Maybe additional headers are the problem or the "\n" has to be "\r\n" or "\n\r" on your system. Sometimes it is.
You can try this:
Code: Select all
if(isset($send_copy_to)) { $from = "From: ".$send_copy_to."\r\n"; if(!ini_get('safe_mode')) { mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\r\n".$content_type."\r\n"); } else { mail($send_copy_to, $subject_encoded, $body, "From: ".$recipient."\r\n".$content_type."\r\n"); } } else { $from = "From: ".$recipient."\r\n"; } if(!ini_get('safe_mode')) { mail($recipient, $subject_encoded, $body, $from.$content_type."\r\n"); } else { mail($recipient, $subject_encoded, $body, $from.$content_type."\r\n"); }
- Oliver Georgi
- Site Admin
- Posts: 9949
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
Hi,
I have checked and worked out this one. I think this works best for everybody:
http://www.phpwcms.de/support/act_formmailer.zip
You will need the most current general.inc.php.
Oliver
I have checked and worked out this one. I think this works best for everybody:
http://www.phpwcms.de/support/act_formmailer.zip
You will need the most current general.inc.php.
Oliver
EMAIL FORM
i changed these files and the email form worked. but some areas of the backend stoped working properly, specifically the article features.I have checked and worked out this one. I think this works best for everybody:
http://www.phpwcms.de/support/act_formmailer.zip
You will need the most current general.inc.php.
Re: EMAIL FORM
That thread is ~almost~ 4 month's old and phpWCMS has progressed beyond any use of that, I believe.kngrnr wrote:i changed these files and the email form worked. but some areas of the backend stoped working properly, specifically the article features.I have checked and worked out this one. I think this works best for everybody:
http://www.phpwcms.de/support/act_formmailer.zip
You will need the most current general.inc.php.