Page 2 of 3
Email to administer now working
Posted: Fri Mar 05, 2010 2:19 pm
by lotuscott
Henrie, I don't know how you figured that out, but it's now working. Thanks. enjoy your drink(s)!
More Mail Blues
Posted: Tue May 04, 2010 8:55 pm
by terribleT
I also am having a problem getting Gbook to send mail. After trying all the fixes here I went to the web host. His reply:
Dear Client,
Please find the details as follows for sending the mail through code.
Mail server :- mail.domain.com (where domain.com will be your domain ).
Port :- 25
Our mail server requires authentication so you have to use user name and password to authenticate before sending mail.
User name :- Any mail id for your domain
Password :- Password of that mail id
Please check and let us know for further assistance.
Problem I havent a clue where or how to code all this info.
Could there be some help here? There is Beer money

Mail Problem Fixed by Host
Posted: Fri May 07, 2010 2:56 pm
by terribleT
My Web host (M6.net) has given me the permissions to post mail from the PHP pages as they do not have the PEAR module installed to allow authentication.
Pretty good of them. All I did was ask.
Tom Thomas
Re: I don't receive e-mail
Posted: Mon Sep 10, 2012 4:34 pm
by jordan
This may come as a little late but...have read through in detail and tried all that was suggested...i receive the test no problems... but still no mail are there any heros out there?
Thanks
Re: I don't receive e-mail
Posted: Mon Sep 10, 2012 5:08 pm
by Henrie
Maybe the e-mail sent by GBook is ending up in your spam folder?
If that is not the problem, did you try as I suggested here
viewtopic.php?p=13033#p13033 and do you still receive the test e-mail when you have done that?
If both these are not the problem, than unfortunately I have no idea what might be wrong.
Greetings,
Henrie
Re: I don't receive e-mail
Posted: Tue Sep 11, 2012 3:53 pm
by jordan
hi Henrie
regular test came in junk
notification
not in junk... no notification
tried new test as specified and did not get test mail...
what i am not sure about is the alternative code: to and from "
sender@mydomain.com"? or "sender@my_email.de"? or my "e_mail_name@my_email_address.de"?
and both in the to and from is the same?
thanks for your time
Re: I don't receive e-mail
Posted: Tue Sep 11, 2012 6:47 pm
by Henrie
The e-mail adresses in to and from can be the same if you want.
In the guestbook I use, i have changed
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
to
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']);
Just try changing the code inside gbook.php (lines 953, 989 and eventually 489),to something that works for you.
I hope this helps.
Henrie
Re: I don't receive e-mail
Posted: Wed Sep 12, 2012 4:15 pm
by jordan
thanks for trying but i give up nothing is working...unless you have another idea
Re: I don't receive e-mail
Posted: Wed Sep 12, 2012 5:08 pm
by Henrie
jordan wrote:This may come as a little late but...have read through in detail and tried all that was suggested...i receive the test no problems... but still no mail are there any heros out there?
jordan wrote:regular test came in junk
So I think you should use the e-mail format as used in the test because than you receive it, Ofcourse you should include the gbook $message. And than whitelist it so it does not en up in your junk folder.
If that does not give the desired results, than I have no idea how to help you.
Regards,
Henrie
Re: I don't receive e-mail
Posted: Sun Jan 20, 2013 8:47 pm
by Bobn
Could this be a problem because of the /sub directory? If I put email_test.php in the root of my directory it sends an email. from the mydomain.com/gbook directory it wont??
Re: I don't receive e-mail
Posted: Sun Jan 20, 2013 9:00 pm
by Bobn
Bobn wrote:Could this be a problem because of the /sub directory? If I put email_test.php in the root of my directory it sends an email. from the mydomain.com/gbook directory it wont??
Interesting,, I loaded the script into the root dir and it sent email fine with the exception that it didnt include the URL in front of gbook.php?id=21b81f403e12d38a4b450b2ef834a34a&a=approve&do=1 So this being said are we on to a solution here??
Re: I don't receive e-mail
Posted: Fri Jan 17, 2014 9:18 pm
by marieb
Ok, so I've read through several posts but still can't figure out my issue.
My gbook show up fine. The test message works just fine. I have another php file that sends me an email fine.
When I click on submit it seems to work and I get the message "Thank you. Your entry has been submitted for approval." It is failing to send me an email tho. Also it creates a txt file on my server in the gbook/
apptmp folder. What the heck am I missing? I'm getting frustrated.
Here is a link to my guestbook page.
http://dsmsoberdrivers.com/Guestbook.html
I see there are some great helpers on here. Hopefully someone can lead me in the right direction.
Thanks!
Marie
Re: I don't receive e-mail
Posted: Sat Jan 18, 2014 9:00 am
by Henrie
Hello Marie,
If you followed this thread, than you already checked that it is not arriving in your spam folder.
So could you test with the email-test script that can be downloaded from
http://www.phpjunkyard.com/extras/email_test.zip
unzip it, change the sender and recipient e-mail adresses in the file email_test.php file to your own address and upload the file to your server. Than open the file in your browser and see if it sends the mail to you.
Please report back what the result is.
Greetings,
Henrie
Re: I don't receive e-mail
Posted: Sat Jan 18, 2014 9:19 am
by marieb
Yep, it works fine. I tried it in both my root folder and my gbook folder.
Re: I don't receive e-mail
Posted: Sat Jan 18, 2014 12:30 pm
by Henrie
Now that we know that the test works, it seems to be the error is in the way that Gbook sends the e-mail.
There is a difference in the way the mail function is set up in in e-mail_test and gbook as I posted before in this thread (
viewtopic.php?p=13033#p13033 )
email_test.php
Code: Select all
mail($to,'Test message','E-mail test successfull',$headers);
and
gbook (line 953 and 989 in gbook.php version 1.7)
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
You could try changing in email_test.php
Code: Select all
mail($to,'Test message','E-mail test successfull',$headers);
to
Code: Select all
mail($to,'Test message','E-mail test successfull','Content-type: text/plain; charset=windows-1250');
That way it will have the same mail headers as are used in the gbook.
If the mail is not received than from the email_test, it might be that your php server configuration requires to add the 'From' and maybe the 'Reply-to' headers in gbook (line 953 and 989 in gbook.php version 1.7) .
In that case you could try changing lines 953 and 989 in gbook.php file
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
to
Code: Select all
mail($settings['admin_email'],$lang['t41'],$message,"From:gbook@dsmsoberdrivers.com\nReply-to:gbook@dsmsoberdrivers.com\nContent-type: text/plain; charset=".$lang['enc']);
Please let us know here if that fixes it, so others can use the same solution.
Greetings,
Henrie