The "From" field is whacked
The "From" field is whacked
Script URL: Behind a Password
Version of script: 1.43
Hosting company: Netwrk Solutions
Write your message below:
I got this script installed and all is working fine. However, when I get a notification email, it says it is from "328033.334070".
Whats with that? How do i tell it to put in the contents of the "Name" field?
Version of script: 1.43
Hosting company: Netwrk Solutions
Write your message below:
I got this script installed and all is working fine. However, when I get a notification email, it says it is from "328033.334070".
Whats with that? How do i tell it to put in the contents of the "Name" field?
Unless you have been editing the gbook.php the name field should display without problems...
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Does it do the same if you use the ORIGINAL gbook.php file (backup your edited one, upload the original one and test it)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
OK, I just uploaded a totally clean (untouched) copy of gbook.php and after filling out the form, it sent me an email.
The exact same thing happened. The email is from "328066.334270@vux.bos.netsolhost.com".
The EXACT email looks like this (headers and all)
---------------------------------------------------
Return-Path: <328066.334270@vux.bos.netsolhost.com>
Delivered-To: admin@328066.385143
Received: (qmail 15685 invoked by uid 78); 6 Nov 2006 18:26:07 -0000
Delivered-To: animalmakers.com-admin@animalmakers.com
Received: (qmail 15661 invoked by uid 78); 6 Nov 2006 18:26:07 -0000
Received: from unknown (HELO ns-mr7.netsolmail.com) (10.49.16.166)
by mail2.lb.hosting.dc2.netsol.com with SMTP; 6 Nov 2006 18:26:07 -0000
Received: from vux.bos.netsolhost.com (vux.bos.netsolhost.com [205.178.145.65])
by ns-mr7.netsolmail.com (8.13.6/8.13.6) with ESMTP id kA6IQ6Bb018967
for <admin@animalmakers.com>; Mon, 6 Nov 2006 13:26:06 -0500
Received: from vux16.prod.netsolhost.com (localhost [127.0.0.1])
by vux.bos.netsolhost.com (8.13.7/8.13.7) with ESMTP id kA6IQ6fo013909
for <admin@animalmakers.com>; Mon, 6 Nov 2006 13:26:06 -0500
Received: (from 328066.334270@localhost)
by vux16.prod.netsolhost.com (8.13.7/8.13.7/Submit) id kA6IQ6OR013908;
Mon, 6 Nov 2006 13:26:06 -0500
Date: Mon, 6 Nov 2006 13:26:06 -0500
From: "328066.334270" <328066.334270@vux.bos.netsolhost.com>
Message-Id: <200611061826.kA6IQ6OR013908@vux16.prod.netsolhost.com>
To: admin@animalmakers.com
Subject: Someone has just signed your guestbook
Hello!
Someone has just signed your guestbook!
Name: test
From: test
E-mail: test@test.com
Website:
Message (without smileys):
Test
Visit the below URL to view your guestbook:
[I have hidden the url]
End of message
---------------------------------------------------
Ideas?
The exact same thing happened. The email is from "328066.334270@vux.bos.netsolhost.com".
The EXACT email looks like this (headers and all)
---------------------------------------------------
Return-Path: <328066.334270@vux.bos.netsolhost.com>
Delivered-To: admin@328066.385143
Received: (qmail 15685 invoked by uid 78); 6 Nov 2006 18:26:07 -0000
Delivered-To: animalmakers.com-admin@animalmakers.com
Received: (qmail 15661 invoked by uid 78); 6 Nov 2006 18:26:07 -0000
Received: from unknown (HELO ns-mr7.netsolmail.com) (10.49.16.166)
by mail2.lb.hosting.dc2.netsol.com with SMTP; 6 Nov 2006 18:26:07 -0000
Received: from vux.bos.netsolhost.com (vux.bos.netsolhost.com [205.178.145.65])
by ns-mr7.netsolmail.com (8.13.6/8.13.6) with ESMTP id kA6IQ6Bb018967
for <admin@animalmakers.com>; Mon, 6 Nov 2006 13:26:06 -0500
Received: from vux16.prod.netsolhost.com (localhost [127.0.0.1])
by vux.bos.netsolhost.com (8.13.7/8.13.7) with ESMTP id kA6IQ6fo013909
for <admin@animalmakers.com>; Mon, 6 Nov 2006 13:26:06 -0500
Received: (from 328066.334270@localhost)
by vux16.prod.netsolhost.com (8.13.7/8.13.7/Submit) id kA6IQ6OR013908;
Mon, 6 Nov 2006 13:26:06 -0500
Date: Mon, 6 Nov 2006 13:26:06 -0500
From: "328066.334270" <328066.334270@vux.bos.netsolhost.com>
Message-Id: <200611061826.kA6IQ6OR013908@vux16.prod.netsolhost.com>
To: admin@animalmakers.com
Subject: Someone has just signed your guestbook
Hello!
Someone has just signed your guestbook!
Name: test
From: test
E-mail: test@test.com
Website:
Message (without smileys):
Test
Visit the below URL to view your guestbook:
[I have hidden the url]
End of message
---------------------------------------------------
Ideas?
-
- Posts: 38
- Joined: Thu Jul 21, 2005 6:25 pm
Ah, now I get it. That is the default "FROM" address your host has set for sending e-mails from user "Nobody" (used for example by PHP scripts).
You don't have to worry about it at all, it's just a (strange) configuration, but if it bothers you that much you can change line 666 from
to
inside gbook.php (replace you@yourmail.com with any e-mail address you wish, for example "From:gbook_entries@yourdomain.com").
You don't have to worry about it at all, it's just a (strange) configuration, but if it bothers you that much you can change line 666 from
Code: Select all
mail("$settings[admin_email]","Someone has just signed your guestbook",$message);
Code: Select all
mail("$settings[admin_email]","Someone has just signed your guestbook",$message,"From:you@yourmail.com");
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
I ran into this same problem with those strange from email addys on the notify emails.
Here is what I tried.
The 'setting's file contains the config for gbook. The 'admin_email' is set here:I added these to the settings.php file:
Then in the actual gbook.php file, I added this:
Then I modified the mail statement to this:
But that just generates errors. I am pretty sure it's because I don't understand the syntax in the $header assignment statement, because it all works if I set $headers with this:
BTW: This last piece of code came directly from the php manual page for mail.
I could leave it at that, but I hate hard coding things like that into a script. I just don't know php well enough to know how to write that assignment.
any help would be appreciated
Thanks,
Ken Loomis
Here is what I tried.
The 'setting's file contains the config for gbook. The 'admin_email' is set here:
Code: Select all
/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']=' \"Ken Loomis\" <username@domain.com>';
Code: Select all
/* The 'From' e-mail. Only required if $settings['notify'] is set to 1 */
$settings['gbook_email']=' \"Gbook Admin\" <gbookadmin@AaronLoomis.com>';
/* The 'Reply' e-mail. Only required if $settings['notify'] is set to 1 */
$settings['reply_email']=' \"Gbook Admin\" <gbookadmin@AaronLoomis.com>';
Code: Select all
$headers = 'From: $settings['gbook_email'] ' . "\r\n" .
'Reply-To: $settings['reply_email'] ' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
Code: Select all
mail("$settings[admin_email]","Someone has just signed your guestbook",$message,$headers);
Code: Select all
$headers = 'From: webmaster@AaronLoomis.com' . "\r\n" .
'Reply-To: kloomis@bigplanet.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
I could leave it at that, but I hate hard coding things like that into a script. I just don't know php well enough to know how to write that assignment.
any help would be appreciated
Thanks,
Ken Loomis
You have to be careful with all the quotes. Variables are not parsed within single quotes ('). Try with:
Code: Select all
$headers = 'From: '.$settings['gbook_email']."\r\n" .
'Reply-To: '.$settings['reply_email']."\r\n".
'X-Mailer: PHP/'.phpversion();
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Thank you, Klemen.
That solved the problem with that assignment statement. I'll have to look at that more closely to see what I was doing wrong. I tried every configuration I could think of with those quotes. But obviously not the right one.
I did run into another problem after fixing that.
Using this to set the from email in the settings file:
Resulted in an email addy that looked like this:
\"Gbook Admin\ <gbookadmin@AaronLoomis.com>
I had to change that to this to make it work:
Which at first glance is pretty confusing since I had patterned that exactly like this:
If anyone can explain that I'd be grateful.
Thanks,
Ken Loomis
That solved the problem with that assignment statement. I'll have to look at that more closely to see what I was doing wrong. I tried every configuration I could think of with those quotes. But obviously not the right one.
I did run into another problem after fixing that.
Using this to set the from email in the settings file:
Code: Select all
/* The 'From' e-mail. Only required if $settings['notify'] is set to 1 */
$settings['gbook_email']=' \"Gbook Admin\" <gbookadmin@AaronLoomis.com>';
\"Gbook Admin\ <gbookadmin@AaronLoomis.com>
I had to change that to this to make it work:
Code: Select all
/* The 'From' e-mail. Only required if $settings['notify'] is set to 1 */
$settings['gbook_email']=' "Gbook Admin" <gbookadmin@AaronLoomis.com>';
Code: Select all
/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']=' \"Ken Loomis\" <kloomis@BigPlanet.com>';
Thanks,
Ken Loomis
You need to escape quotes " with a backslash \ if you are using quotes within quotes. For example:
" \"Ken Loomis\" <kloomis@BigPlanet.com>"
But if you are using quotes " within single-quotes ' you omit the \, like this:
' "Ken Loomis" <kloomis@BigPlanet.com>'
If you on the other hand use single-quotes within single-quotes you need to escape those, for example
' \'Ken Loomis\' <kloomis@BigPlanet.com>'
These are PHP rules, I suggest you find some PHP tutorials when working.
" \"Ken Loomis\" <kloomis@BigPlanet.com>"
But if you are using quotes " within single-quotes ' you omit the \, like this:
' "Ken Loomis" <kloomis@BigPlanet.com>'
If you on the other hand use single-quotes within single-quotes you need to escape those, for example
' \'Ken Loomis\' <kloomis@BigPlanet.com>'
These are PHP rules, I suggest you find some PHP tutorials when working.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Thanks again, Klemen.
From what you described, as I understand it, the original code in gbook is wrong.
Here is the original code from the gbook settings file:
Which I think, if I understand you correctly, should be:
Is that right?
Also, can you explain the why and what for of using single versus double quotes?
I will take your advise and do some tutorials on php. I have done a lot of programming in the past, BASIC, FORTRAN, Pascal, COBOL, even Forth, but usually just modify scripts when working with Perl, Javascript or php. Unfortunately when I was in school, I just missed the C++ revolution.
Thanks,
Ken Loomis
From what you described, as I understand it, the original code in gbook is wrong.
Here is the original code from the gbook settings file:
Code: Select all
/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']=' \"Ken Loomis\" <kloomis@BigPlanet.com>';
Code: Select all
/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']=' "Ken Loomis" <kloomis@BigPlanet.com>';
Also, can you explain the why and what for of using single versus double quotes?
I will take your advise and do some tutorials on php. I have done a lot of programming in the past, BASIC, FORTRAN, Pascal, COBOL, even Forth, but usually just modify scripts when working with Perl, Javascript or php. Unfortunately when I was in school, I just missed the C++ revolution.
Thanks,
Ken Loomis
That's the one to use, yes.
The original settings file has
For double vs single quotes there's a lot here:
http://php.net/types.string
Had to learn Fortran for a year myself, but I left it in the last century
The original settings file has
Code: Select all
$settings['admin_email']='you@yourdomain.com';
http://php.net/types.string
Had to learn Fortran for a year myself, but I left it in the last century

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools