Click to See Complete Forum and Search --> : Sending Mail on a Windows 2000 AS...
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
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
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.
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.
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??
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
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
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!
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
Was SMTP relaying enabled for host with PHP on the old mail server?
Sure thing. SMTP for IIS 5.0 does is automatically.
hi
i am moeiz quadri send mail via phpbuilder
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.