Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 4th, 2004, 01:41 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default mail() is not sending email on localhost SMTP

i always get this error when i use
<?php
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
?>

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\inetpub\wwwroot\misc\mail.php on line 2

i can't get email from locahost SMTP to my account at mail.mydomain.com

php.ini configuration:
SMTP = localhost
sendmail_from = me@localhost.com

SMTP service is running on Windows 2003 IIS; connected to dial-up; windows logon is Administrator/two

anyone there2quickly troubleshoot ? please help
__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
Reply With Quote
  #2 (permalink)  
Old August 4th, 2004, 02:00 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear anshul Would you like to tel me that how you configure PHP on IIS ?
And as for as the SMTP is concern you can check it in adminsitrator tools

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
Reply With Quote
  #3 (permalink)  
Old August 4th, 2004, 02:16 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

we are using php 4.3.2 on windows 2003 server.
i see 'FastCGI Enabled' message on top of phpinfo() page

server API CGI/FastCGI ( this i see in o/p of phpinfo() )
all files of php engine r in c:\php4folder 'c:\php4' also contains a folder nanmed 'php'
we've a php.ini file in C:/windows

is it not possible to send mail from localhost 2 other domain

is this information sufficient?
please answer.
Reply With Quote
  #4 (permalink)  
Old August 4th, 2004, 02:24 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear you can send information to any one from your local host. I can say this because I used it in ASP in IIS.

But as the PHP is concern I used Apache web server

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
Reply With Quote
  #5 (permalink)  
Old August 4th, 2004, 06:38 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

with few modifications, i m getting error:

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for xyz@somedomain.com in c:\inetpub\wwwroot\misc\mail.php on line 2

code of file:
<?php
mail("xyz@somedomain.com", "My Subject", "Line 1\nLine 2\nLine 3");
?>
Reply With Quote
  #6 (permalink)  
Old August 4th, 2004, 06:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does your target server have mail relaying enabled? Usually it wouldn't, for security reasons, unles the serevr admin knows you want to use mail relay. If you have authentication for relaying mail, then an intervening firewall or router may be blocking it. Since you seem to be running Windows kit, you might want to have a look at this article for Exchange Server users:

http://support.microsoft.com/default...;en-us;q295164

HTH
Dan
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending email with SMTP in VB.Net Compiler Forum and Wrox.com Feedback 3 November 30th, 2007 07:25 PM
sending email with SMTP authentication (port 26) crmpicco PHP How-To 3 November 4th, 2007 01:18 PM
Sending email problem - SMTP server response: 554 Havokx Beginning PHP 0 July 27th, 2007 04:04 AM
Problem sending SMTP mail Dsypher ASP.NET 2.0 Basics 3 February 16th, 2006 01:58 PM
Sending EMail thru SMTP server in C# - Most of the peri C# 1 December 20th, 2004 09:33 PM



All times are GMT -4. The time now is 05:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.