Problems with PHP mail(),php.ini and SMTP |
Site Admin
|
if you run php using SRV server, phped/php/php.ini is used
if you run apache/php4 module, apache/php.ini is used if you run apache/php4 cgi, apache/php/php.ini is used. We do not install php.ini into windows directory. check phpinfo() results, they show path to php.ini in the topmost header. Regarding mail configuration under Windows, you probably have to ask php forum boards. This one is intended for phped IDE and other NuSphere products. |
||||||||||||
|
|
Hallo,
your problem is that the smtp server is missing. If you work with apache you need to install one. Maybe you can use the smtp server settings from you ISP. See you! Olaf |
||||||||||||
|
|
olaf,
Thank you very much for the reply - Don't know much about the SMTP servers - don't want to screw up my email with the ISP. But the function works correctly if I upload the test code to my host site. So I thought I would just use that for now and come back and setup the SMTP server on my local box at another time. Thanks again JS |
||||||||||||
|
Site Admin
|
you may want to use the same SMTP server running on the production server.
Note, when your code runs on that server, it uses localhost to access the server, while on the dev. machine the server should be accessed with its real IP. Alternatively you can debug the code remotely, just in place. |
||||||||||||
|
|
This happens to a lot of people which are working with a local server on windows. There is by default no mailserver on windows. There are three possibilities, maybe just 2.5
1. install (if you like) the smtp option from IIS then you have to access some domain to to take care of the DNS 2. a: if you have acces or working on the network from you ISP (bridged mode or something) than try to use the smtp settings from your ISP. b: if not or in case of relaying problems, use one of the smtp connectors on the internet to get a connection with the most (other) smtp servers. 3. install postcast mailserver (or other products) to get regular mail access to the outside world. 4. (oops) maybe nusphere can handle this.... |
||||||||||||
|
I'm a newbie - sounds too complicated |
|
DDimitrie,
Can you expand on your answer. Am I excuting the code on my dev machine or the production server? I'm pretty new to programming - so I decided to setup local apapche and develop locally - get it working and upload to production server. You are suggesting using the production server during development - not sure how debugging would work? Thanks JS |
||||||||||||
|
Site Admin
|
Actually you can and it works, but I did not recommend this way. It's your own risk to install debugger on to the production server. All I meant is to use SMTP server runnign on your production host. No more no less. It's not so hard, you only have to specify appropriate IP in the settings (php.ini) or specify it in the function arguments (depending on the way you use mail-related functions or classes). |
||||||||||||||
|
Problems with PHP mail(),php.ini and SMTP |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by