Computing.Net > Forums > Web Development > verify your smtp port

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

verify your smtp port

Reply to Message Icon

Name: malkaabi
Date: July 16, 2008 at 01:44:51 Pacific
OS: widxp
CPU/Ram: 4 GB
Product: hp
Comment:

Dear friends

I try to run survey created by php scripts , but there is msg appeared when I click on send botton to receive survey result on my mail box ..
The msg is
"Warning: mail()[funcation.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:\Program Files\xampp\htdocs\test1\survey.php on line 198 "

Also I want tell you that, my PC connect on the domain.

How can I fix this problem.

waiting your reply friends




Sponsored Link
Ads by Google

Response Number 1
Name: Elinor
Date: July 31, 2008 at 03:29:19 Pacific
Reply:

Well, do you have a mail server running on localhost? Or is your domain mail server elsewhere?
If it is elsewhere you need to enter the correct smtp address in your config files for mailing to work (note: in that case, you also need your smtp mail server to be open for relay for your localhost IP).

hth

Elinor Hurst
http://elinorhurst.blogspot.com


0

Response Number 2
Name: malkaabi
Date: August 4, 2008 at 23:31:25 Pacific
Reply:

the PC in the domain and I want to use both domain mail server and hotmail

from where can I change smtp port in my PC ??

thx


0

Response Number 3
Name: Elinor
Date: August 5, 2008 at 01:06:57 Pacific
Reply:

Assuming you are using Windows, try changing your php.ini file to something like:

[mail function]
; For Win32 only.
SMTP = smtp.somewhereorother.com
smtp_port = 25

; For Win32 only.
sendmail_from = someone@somewhereorother.com

hth

Elinor Hurst
http://elinorhurst.blogspot.com


0

Response Number 4
Name: WilburUK
Date: October 24, 2008 at 08:27:50 Pacific
Reply:

Hiya

I am having similar problems to 'malkaabi'.

I am new to PHP to this is a little confusing to say the least.

The error message is as follows:

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() in C:\wamp\www\TestApplication\register.php on line 65

I have gone into the PHP.ini file and altered the SMTP statememnt to read:

SMTP = mail.btinternet.com

BT is the sevice provide that we use, so I presume that this is correct?

However, for the 'sendmail_from' statement I have altered to read:

sendmail_from = williamatkinson17@btinternet.com

This was an email address that the ISP (BT) issued me with.

The port is set at 25. I haven't altered this.

However, having run the script after having applied the amendments, it still is not rendering, and is stating the same error message as before.

Am I missing something?
Do I need to actually add some code to the scripts that I am writing??

Please help.

Thanks

Will


0

Response Number 5
Name: Elinor
Date: October 25, 2008 at 12:01:26 Pacific
Reply:

Hi Will,

Are you sure you are changing the correct php.ini file? There are often 2 different php.ini files on the system, only one of which gets loaded.

If you are not sure, check your httpd.conf file.
The PHPIniDir setting determines which directory is used to search for the php.ini file. If present, it's usually located after the line:
LoadModule php5_module "path/to/php5/php5apache2_2.dll"

If it isn't already declared, simply add the line as follows just after the LoadModule line:
PHPIniDir "path/to/phpinidir"
And restart the server.

Hope this helps,

Elinor

Elinor Hurst
http://elinorhurst.blogspot.com


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: verify your smtp port

mail() in php www.computing.net/answers/webdevel/mail-in-php/3562.html

cant send mail from localhost www.computing.net/answers/webdevel/cant-send-mail-from-localhost/3788.html

How to send mail in php localhost www.computing.net/answers/webdevel/how-to-send-mail-in-php-localhost/3919.html