Page 1 of 1

HTTP 500 error when adding a new message

Posted: Sat Jan 09, 2010 12:49 pm
by Jomar
Script URL: http://www.allezmama.nl/gastenboek.html
Version of script: 1.5
Hosting company: Nitroserve
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
PHP Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing

Write your message below:
Hoster is using new servers and the location of the guestbook has changed so at first it didn't work anymore.
The location of the entries.txt is now updated and it's working again, but when I post a new message I get a blank page with HTTP 500 error.
I have to use the backbutton of my browser to see the messages.

The hoster get the following message:
PHP Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in \\data\files\root\localuser\allezma\gbook15\gbook.php on line 745

The only lines that have been changed is the location in settings.php.

Posted: Sat Jan 09, 2010 5:11 pm
by Henrie
Hello Jomar,

Try opening the gbook.php file in an editor.
Find line (line 760)

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message);
and change it to

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message,"From: $name <$email>\r\n");
Try if that helps.

Groeten,
Henrie

Posted: Sun Jan 10, 2010 3:57 am
by Jomar
Henrie, you are amazing!!

That's gonna be two drinks, and maybe a snack to at the Harleyday :D

Posted: Sun Jan 10, 2010 8:02 am
by Henrie
I am not sure i will be at the Harley day in 2010. I booked my vacation last friday and will be gone to Cuba from July 31th till August 15th :D
So maybe another time :)

Groeten,
Henrie

Re:

Posted: Mon Feb 14, 2011 6:45 pm
by jpprice47
Henrie wrote:Hello Jomar,

Try opening the gbook.php file in an editor.
Find line (line 760)

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message);
and change it to

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message,"From: $name <$email>\r\n");
Try if that helps.

Groeten,
Henrie
I am having the same problem, but I am using version 1.7 and that line is not on line 760 or anywhere else.

Any help?

Re: HTTP 500 error when adding a new message

Posted: Mon Feb 14, 2011 9:49 pm
by Henrie
Hello jpprice47,

In version 1.7, there are two places in which the e-mail addres is used, here were go:

Line 989

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
replace it with

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"From: $name <$email>\nReply-to: $email\nReturn-path: $email\nContent-type: text/plain; charset=".$lang['enc']);
Line 953

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
replace it with

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"From: $name <$email>\nReply-to: $email\nReturn-path: $email\nContent-type: text/plain; charset=".$lang['enc']);
There is actually a third on line 489

Code: Select all

mail($email,$lang['t80'],$message,"From: $settings[website_title] <$settings[admin_email]>\nReply-to: $settings[admin_email]\nReturn-path: $settings[admin_email]\nContent-type: text/plain; charset=".$lang['enc']);
But this one does not need replacement.

Greetings,
Henrie

Re: HTTP 500 error when adding a new message

Posted: Wed Feb 23, 2011 4:52 pm
by jpprice47
Thank you!