changing email address of notification email
changing email address of notification email
Script URL:
Version of script:
Hosting company: Webhosting Buzz
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Admin, email, admin email
Write your message below:
Hi there, whenever people sign my guestbook I get emailed a notification telling me of the new post. However I was wondering if I could change the email address it comes from. Currently it shows the email coming from User Josh2008 with email josh2008@buzz1.whbdns.com which looks like its getting the information from my server and my cpanel username. I want to put in a normal email address so that my spam filters dont keep sending it to junk mail. It would be much appreciated if you could tell me how to change the email it sends from.
Version of script:
Hosting company: Webhosting Buzz
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Admin, email, admin email
Write your message below:
Hi there, whenever people sign my guestbook I get emailed a notification telling me of the new post. However I was wondering if I could change the email address it comes from. Currently it shows the email coming from User Josh2008 with email josh2008@buzz1.whbdns.com which looks like its getting the information from my server and my cpanel username. I want to put in a normal email address so that my spam filters dont keep sending it to junk mail. It would be much appreciated if you could tell me how to change the email it sends from.
Try opening gbook.php in Notepad and change to
Code: Select all
mail("$settings[admin_email]",$lang['t41'],$message);
Code: Select all
mail("$settings[admin_email]",$lang['t41'],$message,"From:you@yourmail.com\nReply-to:you@yourmail.com\nReturn-path: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
Can I add to this rather than starting a new thread please.
In v1.7 as opposed to v1.6 above, can I change the address the email notifications are sent from?
Currently, they are sent from the server address (mylogin@myhostname.myservername.net) which doesn't look very attractive and also exposes my control panel login name.
Thank you.
In v1.7 as opposed to v1.6 above, can I change the address the email notifications are sent from?
Currently, they are sent from the server address (mylogin@myhostname.myservername.net) which doesn't look very attractive and also exposes my control panel login name.
Thank you.
Have you tried the hack for v1.6? Should work just fine.
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
Hello cyberdyne,
I think you did not search well enough.
In gbook.php of version GBook 1.7
For the approval e-mail change line 953
For the notification e-mail change line 989
Greetings,
Henrie
I think you did not search well enough.
In gbook.php of version GBook 1.7
For the approval e-mail change line 953
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
The code you posted is slightly different from the code above Henrie.Henrie wrote:Hello cyberdyne,
I think you did not search well enough.
Klemen wrote:Try opening gbook.php in Notepad and changeCode: Select all
mail(" .......
Unfortunately, I searched for the section above.
Confirmed, works perfectly!
Many thanks for your help Henrie.
You are right about that. But when i first do not find the whole line, i always do a second search for part of the line because the code might have changed in new versions. In this case i searched for t41cyberdyne wrote:The code you posted is slightly different from the code above Henrie.
Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Re: changing email address of notification email
Hi there,
I've updated lines 953 & 989 in gbook.phpo as described above but am no longer receiving approval/notification emails - I'm sure I've done something daft - can you please check my code for stupid mistakes;-
Line 953
Line 989
Many Thanks in advance
Miriam
I've updated lines 953 & 989 in gbook.phpo as described above but am no longer receiving approval/notification emails - I'm sure I've done something daft - can you please check my code for stupid mistakes;-
Line 953
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc'],"From:fanpage@whitenightevents.nl\nReply-to:fanpage@whitenightevents.nl\nReturn-path:fanpage@whitenightevents.nl");
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc'],"From:fanpage@whitenightevents.nl\nReply-to:fanpage@whitenightevents.nl\nReturn-path:fanpage@whitenightevents.nl");
Miriam
Re: changing email address of notification email
Try replacing with
If that doesn't work it's possible your server doesn't allow modifying "From" email headers.
Code: Select all
['enc'],
Code: Select all
['enc']."\n".
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
Re: changing email address of notification email
That did the trick - many thanks!