kenabbott
asked on
PHP mail function
Hi
I am running Apache and using PHP. I want to use the mail function within PHP but I am getting the 'failed to connect to mailserver' etc error message. What do I need to do to get this working?
Many thanks
I am running Apache and using PHP. I want to use the mail function within PHP but I am getting the 'failed to connect to mailserver' etc error message. What do I need to do to get this working?
Many thanks
ASKER
Yes I'm on Windows. What do I need to change in php.ini?
Look for your smtp_host setting
-r-
-r-
ASKER
Sorry, I've not done this before. Is this what I'm looking for?
[mail function]
; For Win32 only.
SMTP = localhost
And do I need to change the smtp setting to my ISPs smtp?
Thanks for your help
[mail function]
; For Win32 only.
SMTP = localhost
And do I need to change the smtp setting to my ISPs smtp?
Thanks for your help
Yes, that is the right directive. You need indeed set it to your ISP's or hosting providers SMTP.
-r-
-r-
ASKER
Hi
I've set my local php.ini file to the same settings as my hosts php.ini but I am getting
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for info@rwsd.co.uk
where the latter is the email address I'm trying to send to
Any ideas?
Many thanks
Ken
I've set my local php.ini file to the same settings as my hosts php.ini but I am getting
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for info@rwsd.co.uk
where the latter is the email address I'm trying to send to
Any ideas?
Many thanks
Ken
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you using windows or *x
-r-