Link to home
Start Free TrialLog in
Avatar of REA_ANDREW
REA_ANDREWFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Mail Function

I have installed a  mail function called in my PHP script but since I installedlled php on my dedicated server it does not work so i fear i have not set the correct variables in the php.ini file

can anyone tell me what i hve to set in this to make the mail funcion work.

thanks in advance

andrew
Avatar of dr_dedo
dr_dedo
Flag of Egypt image

check documentation came along this script. also check the path of sendmail in your php.ini
Avatar of star_trek
star_trek

in php.ini, you can add something like the following

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com

Avatar of REA_ANDREW

ASKER

ok cheers

I have set one paramter the 127.0.0.1

this is a dedicated server so these have to reflect all sites that are on this server. Here are my updated variables

[mail function]
; For Win32 only.
SMTP = 127.0.0.1 ; for Win32 only
smtp_port = 25
sendmail_from= me@localhost.com ; for Win32 only

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; 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 =




Please could you point out where am I going wrong and do I have to have a

sendmail_from= me@localhost.com ; for Win32 only

thanks

Andrew
I am assuming you are using windows server and the mail server is on same machine, if not

[mail function]
; For Win32 only.
SMTP = smtp.my.isp.net

; For Win32 only.
sendmail_from = me@myserver.com


If using linux server with sendmail then use
[mail function]
; Setup for Linux systems
sendmail_path = /usr/sbin/sendmail -t

; Setup for Linux systems
sendmail_from = me@myserver.com
Cheers i AM USING WINDOWS server and I have to use 127.0.0.1 as the smtp server so what would the email thing look like, is it necessary?
ASKER CERTIFIED SOLUTION
Avatar of star_trek
star_trek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial