I don't receive e-mail

Dr. GBooky is here to help you with your guestbook problems ...
lotuscott
Posts: 4
Joined: Wed Feb 17, 2010 8:06 pm

Email to administer now working

Post by lotuscott »

Henrie, I don't know how you figured that out, but it's now working. Thanks. enjoy your drink(s)!
terribleT
Posts: 3
Joined: Tue Sep 16, 2008 3:21 pm

More Mail Blues

Post 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 :wink:
Tom Thomas
Bend, Oregon
terribleT
Posts: 3
Joined: Tue Sep 16, 2008 3:21 pm

Mail Problem Fixed by Host

Post 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
Tom Thomas
Bend, Oregon
jordan
Posts: 3
Joined: Mon Sep 10, 2012 4:30 pm

Re: I don't receive e-mail

Post 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: I don't receive e-mail

Post 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
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.
jordan
Posts: 3
Joined: Mon Sep 10, 2012 4:30 pm

Re: I don't receive e-mail

Post 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: I don't receive e-mail

Post 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
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.
jordan
Posts: 3
Joined: Mon Sep 10, 2012 4:30 pm

Re: I don't receive e-mail

Post by jordan »

thanks for trying but i give up nothing is working...unless you have another idea
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: I don't receive e-mail

Post 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
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.
Bobn
Posts: 7
Joined: Thu Dec 06, 2012 2:28 am

Re: I don't receive e-mail

Post 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??
Bobn
Posts: 7
Joined: Thu Dec 06, 2012 2:28 am

Re: I don't receive e-mail

Post 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??
marieb
Posts: 3
Joined: Fri Jan 17, 2014 3:32 pm

Re: I don't receive e-mail

Post 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: I don't receive e-mail

Post 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
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.
marieb
Posts: 3
Joined: Fri Jan 17, 2014 3:32 pm

Re: I don't receive e-mail

Post by marieb »

Yep, it works fine. I tried it in both my root folder and my gbook folder.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: I don't receive e-mail

Post 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
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.
Post Reply