473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PHP ini file SMTP config is failing me left and right.

164 100+
Okay, I have been searching all morning, and have found nothing on how to solve this, I hope I am to be posting this thread under IIS vs. PHP forum. Sorry if its in the wrong spot.

So here is my SMTP section of my php.ini
-------------------------------------------------------------------------
[mail function]
; For Win32 only.
SMTP = mail.website.com
smtp_port = 25

; For Win32 only.
sendmail_from = name@website.com
-----------------------------------------------------------------------

When I try and submit my form, which I know works, I get this error on my page:

[PHP]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:\Websites\TRR DNN\sendmail.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\TRR DNN\sendmail.php:95) in C:\Websites\TRR DNN\sendmail.php on line 96[/PHP]


What I dont understand is why it is saying there is any error at "localhost" when it should be looking for mail.website.com

I have ensured the php.ini file is saved, I have bounced IIS (6, on Windows Server 2003) by the way. Rebooted and everything.

The email server is NOT on this machine, and I CAN to a:
telnet website.com 25
from this machine.

I am juuust out of ideas. Any PHP, mail, IIS peeps that can help me out there that would be GREAT!
Apr 18 '08 #1
3 3861
mbatestblrock
164 100+
UPDATE:

When checking the config with the phpinfo page I have notice something weird?

The config path for the php.ini, according to this page is set to
C:\WINDOWS

when it is indeed set to C:\php

Just an update, thought it might help?

Another update,
The loaded config file says NONE
Apr 18 '08 #2
mbatestblrock
164 100+
Sorry for posting like a mad man! I solved the problem, but I don't know why this was happening.

Like I said, when I ran the phpinfo page it told me it was looking for the ini file in C:\WINDOWS. I don't know where it got that value from??? I had IIS set to look in C:\php and environment variables, and everything else. SO I just dumped the files from the php directory into the WINDOWS directory, and changed everything accordingly and now it works.

I still don't have an answer for why it was looking in the windows directory, I have installed PHP on an identical setup before without this problem. SO I just thought Id follow up in case anyone else runs into this same case.

Good Luck.
Apr 18 '08 #3
dlynx
3
You might also want to try the mMail library found here:

http://www.virtualthinking.com/loadhtml.php?where=scripts&what=art_show.php&db_ta rget=00000000023
Oct 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: rbt | last post by:
The below script produces a ' Bad File Descriptor' when executed. If I remove the try: except: statements, the script stops when the error occurs. The purpose of the script is to monitor the...
2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
4
by: Ed | last post by:
Hello, I took a course in asp about 2 years ago and I was practicing with IIS 5.0. Then I put it down for a while. Now trying to get back to it. I can't run asp files from subdirectories of...
0
by: Henrik Bergman | last post by:
Hi all As I subscribe MSDN I got an USB-memory with Microsoft eLearing library. I found an exampell how to send SMTP e-mail using CDO.Message object and CDO.Configuration. MSDN has also got...
5
by: Prashant Barnwal | last post by:
Hi, This message i get whne i try to send mails theu my app server. any idea where and what to look for? It works fine in Dev bed. Guide me to apprpriate news group if its not the right place. ...
7
by: news | last post by:
Recently our mail from our e-commerce site has been rejected by AOL due to an IP block because someone was using our PHP scripts to send spam. Well, I got that fixed. But our legitimate...
2
by: 3471Jack329 | last post by:
This is a stupid question but I risk it. Just in case something is possible... How can I modify the web.config settings from ASP.NET programming? <system.net> <mailSettings> <smtp...
2
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I've tried: MailSettingsSectionGroup mailConfig = WebConfigurationManager.GetSection("system.net/mailSettings") as MailSettingsSectionGroup; and: Configuration configurationFile =...
13
by: jcor | last post by:
Hi, I'm trying some code to send a mail with my script. This is it: #!/usr/bin/perl use Net::SMTP; my $smtp_server='62.193.245.15'; my $smtp = Net::SMTP->new($smtp_server) or die "Can't Open...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.