Page 1 of 1

PHP E-Mail Problems

Posted: Sat Jan 31, 2004 7:03 pm
by ut1205
I've just tried a couple of Free E-Mail scripts and get error messages when I try to send them. I figuered my Cable ISP was blocking my E-Mail Ports but a scan of my ports showed Port 25 and Port 110 "Closed but Not Blocked - No Program Using Them".

Second Question: Where is php.ini. I can't find it even with a search of my drives.

Below is the script I tried and at the bottom the error message I recieved.
Am I doing something wrong?

<HTML>

<HEAD>
</HEAD>

<BODY>

Code: Select all

<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($subject);
$text = stripslashes($text);
mail('test@test.com',$subject,$text,"From: $name <$email>");
header("location:form.php");
?>
</BODY>
</HTML>

Error Message Received:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
in C:\Phperl2.3\Websites\Site1\www\process.php

Thanks

Jim

Posted: Sat Jan 31, 2004 7:38 pm
by Straterra
Mine is in my Windows directory..I assume you host your own site?

Found It

Posted: Sat Jan 31, 2004 8:35 pm
by ut1205
Found it in Windows. It id's as a "config" file not an .ini. The only mail setting I could find are:

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

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

I don't know if these are right or not.
Yes I do have a server and host my own site.

Thanks for the reply.

Jim