PDA

View Full Version : PHP and Sendmail Problem (Installed locally in windows xp)



jhmisa
05-24-2004, 01:22 AM
Hello!
I am running Apache 2.0.48 on a Windows XP Machine. I want to make a testing station before uploading all the files. I Installed PHP 4.3.4 and MySQL Server and PHPMyAdmin to replicate what I have going in Westhost. Please take note that I am not running any Mail Server. Everything seems to be running fine but when I tried to send a test mail I got the following errors.

============================================
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\phpweb\samplemail.php on line 2
============================================

The code I used was the following for testing...
============================================
<?php
mail('jhmisa@jp-orion.com', 'just testing', 'just testing');
?>
============================================

I got into a website and it was written there that if you don't have your own mail server then you can still send emails by using your ISP's SMTP. It needs to be setup in your php.ini.. so that's what I did.. I changed the following in my php.ini. My ISP uses apricot.ocn.ne.jp that's why I changed it to that.

============================================
[mail function]
; For Win32 only.
SMTP = apricot.ocn.ne.jp

; For Win32 only.
;sendmail_from = jhmisa@jp-orion.com
============================================

Thanks very much

wildjokerdesign
05-24-2004, 07:22 AM
If what you posted is cut and paste from your php.ini then I think you need to remove the ";" from in front of your sendmail_form. That would comment out what you are trying to set it to. Could be you may have some other issues other then that but I did notice that in your post.

Just guessing but you still may not be able to send mail from your local setup depending on your ISP and if they have limitations that may not let you connect to it this way. I would think you would have to in some whay log into their system with your password but not sure what it would take to do that. Just makes sense otherwise anyone could use thier mail server even if they where not a customer.