To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Windows Help

Windows Help Help with the Windows operating system

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-13-2000, 01:05 PM   #1
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
Mail with windows NT

Hi!

What special configurations have to made if the mail() function is gonna work correct?
Now it just goes in a forever loop when i try to use the mail function.
A mail server is running on the NT server.

Don't now what to configure because i can't find anything about it in the php documentation.

In linux i just compiled it and it used the local sendmailserver.

//Mattias
Anon is offline   Reply With Quote
Old 07-13-2000, 01:19 PM   #2
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Mail with windows NT

In the php3.ini file, add/edit the line

SMTP = <your smtp server>

where this is either the dns or ip address for the smtp server.
Anon is offline   Reply With Quote
Old 07-13-2000, 01:33 PM   #3
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Mail with windows NT

Depending on what version of PHP you are using, some versions Pre Version 4 had a strange requirement that the mail function require a 4th blank argument if you aren't using it already.

Ex:

<?
mail("you@yourdomain.com", "Email", "Hello. Goodbye.", "");

?>

Brett
Anon is offline   Reply With Quote
Old 07-13-2000, 05:10 PM   #4
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Mail with windows NT

I have the same problem w/ the infinite, inbox clogging, php mail() loop. An undocumented feature. None of the reply's here really even address the original question. Mattias, I don't have a resolution, but I have the same problem. Boy that helps :-) I miss .asp, and CF. I think php is truly meant for a Linux/Apache/MySQL configuration...
Anon is offline   Reply With Quote
Old 07-13-2000, 10:54 PM   #5
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Mail with windows NT

Indeed ...

I have exactly the same problem and nothing from what suggested helped me :(

Any more tips to try?

firecool
Anon is offline   Reply With Quote
Old 07-15-2000, 01:01 PM   #6
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
FIXED: Mail with windows NT

I was having the verry same problem, until I followed the previous instructions.

For me, it is the php.ini in my winnt directory. I too had smtp servous on my computer, but could not send messages. I used another SMTP server and made changes in php.ini, then I stopped the IIS ADMIN service and restarted all necessary services.

Now, my messages all go through.

lee graham wrote:
-------------------------------
In the php3.ini file, add/edit the line

SMTP = <your smtp server>

where this is either the dns or ip address for the smtp server.
Anon is offline   Reply With Quote
Old 07-17-2000, 01:49 PM   #7
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
not fixed?

Perhaps we're talking about two different things here. I can get the mail function to work, but sometimes it gets stuck in a "loop"
and sends tons of emails to the same inbox. Literally thousands of emails... I thought that's what the original post was about... "stuck in a forever loop", but there's no loops in the code. I hope everyone knows how to write in the name of there mail server on the php.ini file
:-) HAve fun, as for me I'm still dying to switch to a Linux/Apache configuration, or go back to uaing .asp or CF...
Anon is offline   Reply With Quote
Old 07-18-2000, 10:01 AM   #8
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: not fixed?

I doubt this is a problem with PHP's mail() function. I would be more inclined to check your control structure.

Since you didn't giva any details about what your code looks like, I'll make a few assumptions. Even with these assumptions, you should be able to use this technique to debug your application.

We'll assume you're using a for loop. If your app looks something like this now:
<pre>
for ($i = 0; $i < somefunc(); $i++)
{
mail($person, $subject, $message);
}

Then change it to this:

for ($i = 0; $i < somefunc(); $i++)
{
echo "This is iteration number '$i'. \n<br>";
}

I'll bet you find that you still have an infinite loop.

The reason I responded as such before is because I was having problems with the mail() function related to my SMTP server and the effects were the same as a loop. The page would never stop loading. Difference being that there were no emails being sent.

Hope this helps. If it doesn't, attach some code and people will be able to help more.

Matt Nuzum
Anon is offline   Reply With Quote
Old 07-18-2000, 02:17 PM   #9
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: not fixed?

Thanks, but I forgot to specify one important detail: It's just the plain mail function. HThere is no other code. It is simply a form that submits and emails form data. no loops, no iterations, no database, nothing. That's the problem. It is the mail function and nothing else. When I first started I had the same problem w/ the page loading that you had Matthew, but that's a configuration issue I resolved. I don't know if we're all on the same page here, but my problem is that all of my php mail pages get set off at random times and just start sending off emails to wherever they are addressed to w/ blank data if the $to is hard-coded. It sends an email a minute (approximately) and the only way to stop it is reboot the server. It may have nothing to do w/ php. I mean at first the only thing I could thing of was a dos attack, or some 3rd party software setting it off. Either way it sucks...
Anon is offline   Reply With Quote
Old 07-19-2000, 12:04 PM   #10
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: FIXED: Mail with windows NT

My promblem is now solved
Couldn't use my local mailserver at 192.168... hade to use my linux mailservers adress in php ini.
Anon is offline   Reply With Quote
Old 09-19-2000, 04:02 AM   #11
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Mail with windows NT

THIS SOLVED MY PROBLEM, WHY IT ISN'T IN THE MANUAL, I DON'T KNOW

J
Anon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:38 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.