Page 1 of 1
mail function
Posted: Mon Nov 04, 2002 6:57 pm
by BarryS
I am new to php and have not had the mail () function to work. Using RH7.3 the mail appears to go to /var/spool/mail/root.
Php info environment also says mail goes to the same local address. How do I make it work with smtp/sendmail?
Any help will be appreciated.
Posted: Tue Nov 05, 2002 5:20 am
by DeGauss
What's the sendmail line in your php.ini file look like?
I'm assuming it's still php.ini on nix boxes...
Posted: Tue Nov 05, 2002 6:49 am
by BarryS
My php.ini says:
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from =
me@localhost.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/lib/sendmail
There are no more references to sendmail
Still lost, thanks for your input
Posted: Tue Nov 05, 2002 6:52 am
by volka
can you send mails to local/remote accounts in a shell via mail-command?
man mail for syntax and options. maybe your
sendmail/
qmailisn't configured by now.
Setting Up sendmail in RedHat Linux 7.1
Posted: Thu Nov 07, 2002 3:30 pm
by BarryS
Many thanks for your help. I could not send them, but now I can send from the terminal and users can as well. I still cannot send from the php mail() function.
I am not sure the core is correct in phpinfo() I have
sendmail_from
bloggs@bloggy.net
path /usr/lib/sendmail
(this is the correct path to sendmail)
SMTP localhost
Mail /var/spool/mail/root
Any ideas: Maybe the php.ini, what would the php.ini usually say?
Posted: Thu Nov 07, 2002 6:26 pm
by BarryS
Found the last problem. I failed to delete the [Mail] windows references in the php.ini.
Maybe, other's have done the same thing as the associated comments did not mention it.
Thanks for the help everyone.