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-14-2000, 05:20 AM   #1
Anon
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
Anon is offline   Reply With Quote
Old 07-14-2000, 11:17 AM   #2
Anon
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
Anon is offline   Reply With Quote
Old 07-14-2000, 12:41 PM   #3
Anon
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.

Anon is offline   Reply With Quote
Old 07-14-2000, 02:57 PM   #4
Anon
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.
Anon is offline   Reply With Quote
Old 07-15-2000, 01:09 AM   #5
Anon
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??
Anon is offline   Reply With Quote
Old 07-15-2000, 01:07 PM   #6
Anon
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
Anon is offline   Reply With Quote
Old 07-17-2000, 05:08 AM   #7
Anon
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
Anon is offline   Reply With Quote
Old 07-17-2000, 05:19 AM   #8
Anon
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!
Anon is offline   Reply With Quote
Old 07-18-2000, 05:07 AM   #9
Anon
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
Anon is offline   Reply With Quote
Old 07-20-2000, 05:01 AM   #10
Anon
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?
Anon is offline   Reply With Quote
Old 07-20-2000, 05:28 AM   #11
Anon
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.

Anon is offline   Reply With Quote
Old 07-21-2000, 06:58 AM   #12
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: Sending Mail... [works like this]...

mierda para el php
Anon is offline   Reply With Quote
Old 08-30-2000, 09:53 AM   #13
Anon
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

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 07:24 PM.






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.