Home > Archive > PHP Installation > March 2004 > Re: [PHP-INSTALL] mail() sendmail problems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-INSTALL] mail() sendmail problems
|
|
| Chris Hewitt 2004-03-18, 6:27 pm |
| Elijah A. Chancey wrote:
> I'm having difficulty with the php mail() function. Freebsd 4.9,
> apache 2.0.48, php 4.3.4
>
> Here is my code:
>
> <?php
> mail("sy min@netlinkip.com", "subject", "body");
> ?>
>
> The problem:
> The mail is not being delivered to my address. PHP returns no errors.
>
Can a normal user send email? If so then it is a php problem, if not a
sendmail one. I think that will help to narrow it down a bit.
HTH
Chris
| |
| Chris Hewitt 2004-03-18, 6:27 pm |
| Elijah A. Chancey wrote:
> Can a normal user send mail via which means?
>
> e
> On Feb 23, 2004, at 11:35 AM, Chris Hewitt wrote:
>
>
Yes, all users on a unix box should be able to send email. From a prompt:
mail -s "mysubject" toyou@yourbox.com <filewithmessage
will do it. Do a "man mail" for more information. It will use whatever
email system you have set up on the computer, thus it is a good test to
see where email may be going wrong. When you have email going from a
normal user OK then its time to check from php again.
HTH
Chris
| |
| Chris Hewitt 2004-03-18, 6:27 pm |
| Elijah A. Chancey wrote:
> The command mail works perfectly.
>
> What sorts of php things can I investigate?
>
> e
> On Feb 23, 2004, at 1:40 PM, Chris Hewitt wrote:
>
>
(Lets do the conventional bottom posting and keep this on the list).
You can check in php.ini for the "sendmail_path" option being
uncommented, and set to something suitable, commonly:
sendmail_path = /usr/bin/sendmail -t -i
You could also just check by pointing a browser at a phpinfo() file that
the php.ini that you are checking is where PHP is looking for it.
I have not used the newer sendmails with submit.mc, I use sendmail here
but all emails are sent to my ISP's email server which I have configured
as the smart_host. This is not likely to be a problem for you as an
ordinary user can send email.
I don't use the inbuilt mail command in PHP, but a more flexible wrapper
class from php-classes.org so I can only assume that your PHP mail
command syntax is OK. Other than the above, I can't think of anything to
go wrong.
HTH
Chris
PS I've got to go now, be around in the morning.
[color=darkred]
|
|
|
|
|