Novahq.net Forum

Novahq.net Forum (https://novahq.net/forum/index.php)
-   phphq.Net Forums (https://novahq.net/forum/forumdisplay.php?f=277)
-   -   help with warning (https://novahq.net/forum/showthread.php?t=38727)

isis 02-23-2006 04:41 PM

help with warning
 
I keep getting this warning...

any idea what it means?

Warning: 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:\domains\serenitydesigns.ca\wwwroot\feedback.php on line 355
An error has occured, please report this to the website administrator.

thanks a bunch!!!

nraum 03-23-2006 07:33 AM

Hey, this is a really tough one to find support online for, but I finally found a solution when I had this problem...my guess is that you're running php on windows from some sort of auto php/mysql/apache installation package.

In your php code for the mailer, you need to use the following code somewhere:

PHP Code:

ini_set("SMTP","smtp.yourdomain.com");
ini_set("sendmail_from","info@boardwalkfsu.net"); 

I would put it right above the mail code beginning with:
PHP Code:

//Headers        
//Headers 
$headers="From: ".$yourname." <".$youremail.">\n";
$headers.="Reply-To: ".$yourname." <".$youremail.">\n";
$headers.="MIME-Version: 1.0\n"

From what I understand, this sets the mail server in your PHP.INI configuration file temporarily. For some reason I'm not sure of, the default "localhost" wouldn't work. Give it a try, let me know how it works out for you. If anyone else has anything to add, please post!

-Narayan

Scott 03-23-2006 02:59 PM

I had alot of problems with setting up a 3rd party smtp server with windows. It's very difficult to find support for it also.. what my problem ended up being was my mail server didn't want to accept mail from the IP it was coming from without logging on first. In your SMTP server, if you have relay settings set to off, make sure you set it to ignore your server IP addresses and do not requre auth from your SERVER IP's


All times are GMT -5. The time now is 06:41 AM.

Powered by vBulletin®