SunQuest
           PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 5th, 2006, 08:58 PM
yehuda54 yehuda54 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 yehuda54 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SMTP with PHP 5

I am running php 5 off an Apache2 server on windows. When I run the mail() function I recieve an error that my php.ini is not configured correctly. Can anyone please tell me how to configure the php.ini file.

Reply With Quote
  #2  
Old July 6th, 2006, 09:29 PM
yehuda54 yehuda54 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 yehuda54 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: SMTP with PHP 5

I installed PHP 5 on my windows xp successuly. However, when I try to send out mail with the mail(), I recieve the following error:

Quote:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()


My mail settings in my php.ini file is configured like this:
Quote:
[mail function]
; For Win32 only.
SMTP = localhost

; for Win32 only
smtp_port = 25

; For Win32 only.
sendmail_from = me@localhost.com


Someone advise me to test if I can connect to telnet localhost 25 -- the connection failed. I am not sure what that indicates.

I tried to shut off the windows firewall and then try to use the mail(), but it still did not work.

If someone can please tell me how to get SMTP working?

Reply With Quote
  #3  
Old July 7th, 2006, 09:07 AM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 12288 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 50 m 48 sec
Reputation Power: 4
RE: SMTP with PHP 5

I'm starting to think you don't have an SMTP server installed. Possible solutions: 1) install one on the same server as Apache 2) use another server for that. If your ISP allows it, you could use their SMTP server.

Reply With Quote
  #4  
Old July 7th, 2006, 02:50 PM
yehuda54 yehuda54 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 yehuda54 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: SMTP with PHP 5

I thaught PHP or Apache comes with an SMTP server, but that could a misconception.

Do you have any suggestions for SMTP servers?

Reply With Quote
  #5  
Old July 7th, 2006, 03:24 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,320 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 12288 Folding Title: Novice Folder
Time spent in forums: 6 Days 8 h 50 m 48 sec
Reputation Power: 4
RE: SMTP with PHP 5

PHP contains no servers, and apache is only a HTTP server.

Unfortunately, I have no experience with mail servers, so I can't really suggest anything.

Reply With Quote
  #6  
Old July 16th, 2006, 02:21 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: SMTP with PHP 5

Here is a link - http://www.hmailserver.com

Reply With Quote
  #7  
Old July 17th, 2006, 07:54 PM
OldManRiver OldManRiver is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 15 OldManRiver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 23 sec
Reputation Power: 0
Send a message via AIM to OldManRiver Send a message via Yahoo to OldManRiver
RE: SMTP with PHP 5

yehuda54,

We had that problem yesterday and fixed it by looking up our SMTP in our local mail program.

If you use Outlook, Outlook Express, Eudora, Pegasus Mail or some other desktop mail client, you can find the SMTP settings in the config for that particular program.

If you use a webmail client like yahoo, hotmail, mail, etc. You need to contact your ISP to get the SMTP settings. If you are on a Broadband or Highspeed connection the SMTP configuration information is available either in your config file that came with your DSL/Cable modem or is available when you log into your online account.

Anyway you should wind up with something like the following in your php.ini file:
Code:
[mail function]
; For Win32 only.
;SMTP = localhost
SMTP = SMTP.comcast.net
smtp_port = 25


Where you copy the SMTP line, comment out the first, and edit the second to your known SMTP settings.

What we are fighting today is, we need to send 3 emails back to back. We find the mail command hangs or leaves the socket open and will not except another email until it is re-initialized. I'm trying to find code to re-init the socket or mail handler.

OMR



Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > SMTP with PHP 5


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway