Page 1 of 1

Subscribe to this and sending the admin email

Posted: Thu Oct 28, 2004 11:13 pm
by Guest
I'm having a problem receiving emails when:

- someone posts a comment, no email comes to me, the admin
- someone subscribes to a post when making a comment, they receive no email

I saw something in another thread about "is php mail enabled on your server" or something to that effect.

Is there a way I can check this out (the server, php, etc, is all mine so I have full access to everything) and get PHP configured to perform the email functions? What steps do I take to ensure I have the proper items enabled at the PHP level?

I currently have other functions on my website using formmail/blat (perl) to do the emailing, but it sounds like this is strictly via php implementation, so any assistance would be appreciated.

Thanks!

Re: Subscribe to this and sending the admin email

Posted: Fri Oct 29, 2004 10:51 am
by garvinhicking
Yes, your PHP needs to have a sendmail linkage. You need to have a sendmail-compatible MTA on your server, and it needs to be installed when you compile PHP. Otherwise, the mail() function will not work for you.

Create a script like

Code: Select all

<?php phpinfo(); ?>
and search for "sendmail_path". It should give you the location of the sendmail binary.

Ah, of course that only works on a unix/linux server, which I assume you have, right?

You can create a simple script to test if mails work:

Code: Select all

<?php
mail('your@host.com', 'Testmail', 'This is a test mail');
Then "your@host.com" should receive an email. If that is not the case, you should check your MTA setup on the machine, look for possible postmaster error reports or bounces...