Apache2Triad Help, Support and Development Forum Index Apache2Triad Help, Support and Development
The apache2triad help , support and development forums
 

SMTP error
Click here to go to the original topic

 
       Apache2Triad Help, Support and Development Forum Index -> E-mail
View previous topic :: View next topic  
Author Message
comingbackdown



Joined: 05 Mar 2007
Posts: 3
Location: Ohio, U.S.

Posted: Tue Jul 24, 2007 2:54 am    Post subject: SMTP error  

Note: I need to have this running by tomorrow evening. Current date and time: July 23, 10:56 P.M.

I'm using a Dell Inspiron 2200 Laptop as my testing server, seeing as that's what I'm writing my code on at the moment. I just migrated to the laptop and installed A2T. I went to test a perfectly written formmail script that works on my desktop computer, and found this in the error log.

Quote:
Php 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:\apache2triad\htdocs\trillum\htfiles\formmail.php line 48

Php 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:\apache2triad\htdocs\trillum\htfiles\formmail.php line


Those are the messages that I got. I used another formmail script that was almost identical, also worked perfectly on the desktop. Same error messages. :cry:

What's wrong, and how do I fix it???

Any help is much appreciated.
Back to top  
dale



Joined: 11 Jun 2006
Posts: 51
Location: las vegas, nv

Posted: Tue Jul 24, 2007 4:12 am    Post subject:  

Find your php.ini file and see if you have this.

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

The ; is the identifier for commenting out the line, so if you have something like this

;smtp_port = 25

Then take the ; out of the beginning of the line. Check and see if you don't have something like this going on.
Back to top  
comingbackdown



Joined: 05 Mar 2007
Posts: 3
Location: Ohio, U.S.

Posted: Tue Jul 24, 2007 9:47 am    Post subject:  

dale wrote: Find your php.ini file and see if you have this.

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

The ; is the identifier for commenting out the line, so if you have something like this

;smtp_port = 25

Then take the ; out of the beginning of the line. Check and see if you don't have something like this going on.

I checked php.ini, and the smtp_port line did not have a ";" in front of it.

Any more suggestions?

It is possible, is it not, that port 25 is in use by another process?

How do I tell if a port is being used by another program/service on the machine? If that's the problem, then how do I change it to another port???

If I'm going to have my testing done on time, I need this problem fixed by tonight.

EDIT:

the testmail cgi program will send mail, but my script won't...
I'm completely and totally lost...
Back to top  
hero2005



Joined: 11 Aug 2008
Posts: 1

Posted: Mon Aug 11, 2008 8:54 am    Post subject:  

put these statements at the top of your script

ini_set( sendmail_from, "your@email.com" );
ini_set( SMTP, "mail.yours.com" );
ini_set( smtp_port, 25 );

don't forget to change your@email.com to your email

and mail.yours.com to your mail server

regards

:D
Back to top  
alexx_2010



Joined: 18 Nov 2009
Posts: 1

Posted: Fri Nov 20, 2009 6:59 am    Post subject:  

Checked php.ini and make sure that smtp_port have a ";" in front of it.

Structural Engineering Services
Back to top  
 
       Apache2Triad Help, Support and Development Forum Index -> E-mail
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.13 © 2001, 2002 phpBB Group