Click to See Complete Forum and Search --> : Sending Mail on a Windows 2000 AS...


Anon
07-14-2000, 05:20 AM
The mail() function doesn't seem to work that well on my OS.

I'm running a Windows 2000 Advanced Server, IIS5.0, PHP 4.01 PL2.

I've done the main things like:

- Edit the line with the SMTP server in PHP.ini

- Put an extra "" in my code:
<?
mail("corap@yahoo.com", "Test To Mail", "Hey, this works!","");
?>

But nothing seems to work. It just hangs and waits and waits. An infinite loop.

Is there anybody out there who have fixed this problem?

Cheers!

/idris

Anon
07-14-2000, 11:17 AM
On Windows NT 4.0/IIS 4.0/PHP4.0 works following
in php.ini:
[mail function]
SMTP = your.smtp.server ;for win32 only
sendmail_from = sender@your.domain ;for win32 only

Anon
07-14-2000, 12:41 PM
I have the same problem. Almost same platform. Search for the mail function on php.net

In the annotated notes manual, near the bottom there is a post by someone who made it work by adding some of the optional parameters.

Good luck--i havent had time to try this myself yet.

Anon
07-14-2000, 02:57 PM
Wierd. I've read so many accounts of this Win2k AS causing mail() problems, but I've been using it for about 6 months now and haven't had this problem. The problem I ran into was making multiple mail() calls in a row.

Anon
07-15-2000, 01:09 AM
Just to add on to the list - I am having the same problem as everybody else - funny how so many people have this problem yet no one has stepped up with a fix yet. Isn't this considered a bug??

Anon
07-15-2000, 01:07 PM
I use Win2K Pro and was having the same problem.

I fixed it by using a different SMTP server than localhost.

I had to stop IIS Admin service and then restart all IIS services before change took effect.

I then used this function to send my messages:
mail($record[2], $subject, $message, $from);

where all variables contain valid information.

Hope this helps,

YIC,
Matthew Nuzum


Idris Corap wrote:
-------------------------------
The mail() function doesn't seem to work that well on my OS.

I'm running a Windows 2000 Advanced Server, IIS5.0, PHP 4.01 PL2.

I've done the main things like:

- Edit the line with the SMTP server in PHP.ini

- Put an extra "" in my code:
<?
mail("corap@yahoo.com", "Test To Mail", "Hey, this works!","");
?>

But nothing seems to work. It just hangs and waits and waits. An infinite loop.

Is there anybody out there who have fixed this problem?

Cheers!

/idris

Anon
07-17-2000, 05:08 AM
Ok!
I've tried to use another mailserver and guess what, it works. It shouldn't be like this. I hope this will be fixed in later versions.

So, put another mailserver and it works...

/idris

Anon
07-17-2000, 05:19 AM
hi,

i am working in win95 environment and i don't know how to set SMTP?...how can i know what going to be set?

Urgent...thanks a lot!

Anon
07-18-2000, 05:07 AM
I assume you already installed PHP and it's running.
1. In PHP.INI there is a section called [mail function].

FROM PHP.INI:
================================
[mail function]
SMTP = mail.whatever.com ;for win32 only
sendmail_from = user@mail.whatever.com ;for win32 only
================================

As you see, you need a mailserver address.
You can't use a local one [localhost], you'll get an error.

Then you need a user for that mailserver.

<?
mail("you@somehost.com", "the subject", "message","");
?>


Then it works...

Hope this will work.

/idris

Anon
07-20-2000, 05:01 AM
Was SMTP relaying enabled for host with PHP on the old mail server?

Anon
07-20-2000, 05:28 AM
Sure thing. SMTP for IIS 5.0 does is automatically.

Anon
07-21-2000, 06:58 AM
mierda para el php

Anon
08-30-2000, 09:53 AM
hi

i am moeiz quadri send mail via phpbuilder