LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 04-29-2013, 12:22 AM   #1
kiran.ursal
Member
 
Registered: Feb 2012
Posts: 36

Rep: Reputation: Disabled
Wink How to send mail using PHP mail function On apache server


Hello,
I am using centos-6.2
Quote:
[root@localhost sbin]# uname -a
'Linux localhost.localdomain 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011 i686 i686 i386 GNU/Linux
I have apache server,php5 on my system and I want to send mail using sendmail on my system.
when I try to send mail from shell that time mail is succesfully sent to respective address(
Quote:
php -r 'mail("K.u@gmail.com","hi","hello","r.u@gmail.com");'
)

but when I try to send it through webbrowser I am not able to send it.
so please help me if anybuddy knows the solution on this problem
 
Old 04-29-2013, 01:58 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,248

Rep: Reputation: 394Reputation: 394Reputation: 394Reputation: 394
Check your apache server and if it's doing other PHP functions correctly then check whatever PHP code you're using in your script.
 
Old 04-29-2013, 03:21 AM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,391

Rep: Reputation: 97
maybe the webuser (wwwrun, nobody or such) is not allowed to use sendmail functionality? Check permissions.
Could be helpful to take a look at apache error logs. Maybe you can find a hint in there.

Last edited by j-ray; 04-29-2013 at 03:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to send mail with php mail() command - minimum config required? FeathersMc Linux - Server 2 10-26-2008 12:21 AM
Do i need to configure anything in Apache to let php to send mail shailesh_mishra Linux - Server 1 01-19-2007 02:24 AM
Help needed to send mail using a remote smtp server with php s1mpl1c1ty Programming 4 09-19-2005 12:53 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
send mail via PHP from website on apache. not working mdkelly069 Linux - Software 0 02-25-2004 12:15 PM


All times are GMT -5. The time now is 03:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration