help with PHP mail()
Posted: Mon Aug 02, 2010 4:38 pm
Hi All,
I am a newbie to php. I am try to send mail from my web application but I can't do that. I had google alot and found mail() internally calls sendmail and we need to edit php.ini for that.Here is my php.ini's [mail function].
[text]
[mail function]
; For Win32 only.
; http://www.php.net/manual/en/mail.confi ... p#ini.smtp
SMTP = localhost
; http://www.php.net/manual/en/mail.confi ... .smtp-port
smtp_port = 25
; For Win32 only.
; http://www.php.net/manual/en/mail.confi ... dmail-from
;sendmail_from = me@example.com
sendmail_from = root@localhost
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://www.php.net/manual/en/mail.confi ... dmail-path
sendmail_path = /usr/sbin/sendmail -t -i
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originaiting-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
[/text]
Is it fine or do I need to add anything else. Please help me in this regard. Your help is appreiciated.
Thanks
Bhanu
I am a newbie to php. I am try to send mail from my web application but I can't do that. I had google alot and found mail() internally calls sendmail and we need to edit php.ini for that.Here is my php.ini's [mail function].
[text]
[mail function]
; For Win32 only.
; http://www.php.net/manual/en/mail.confi ... p#ini.smtp
SMTP = localhost
; http://www.php.net/manual/en/mail.confi ... .smtp-port
smtp_port = 25
; For Win32 only.
; http://www.php.net/manual/en/mail.confi ... dmail-from
;sendmail_from = me@example.com
sendmail_from = root@localhost
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://www.php.net/manual/en/mail.confi ... dmail-path
sendmail_path = /usr/sbin/sendmail -t -i
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originaiting-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
[/text]
Is it fine or do I need to add anything else. Please help me in this regard. Your help is appreiciated.
Thanks
Bhanu