Windows Help Help with the Windows operating system
07-14-2000, 05:20 AM
#1
Senior Member
Join Date: Jun 2000
Posts: 65,386
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
07-14-2000, 11:17 AM
#2
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
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
07-14-2000, 12:41 PM
#3
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
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.
07-14-2000, 02:57 PM
#4
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
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.
07-15-2000, 01:09 AM
#5
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
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??
07-15-2000, 01:07 PM
#6
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
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
07-17-2000, 05:08 AM
#7
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
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
07-17-2000, 05:19 AM
#8
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
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!
07-18-2000, 05:07 AM
#9
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
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
07-20-2000, 05:01 AM
#10
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
Was SMTP relaying enabled for host with PHP on the old mail server?
07-20-2000, 05:28 AM
#11
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
Sure thing. SMTP for IIS 5.0 does is automatically.
07-21-2000, 06:58 AM
#12
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...
mierda para el php
08-30-2000, 09:53 AM
#13
Senior Member
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail on a Windows 2000 AS...
hi
i am moeiz quadri send mail via phpbuilder
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Rate This Thread
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -4. The time now is 07:24 PM .