473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SMTP mail problem (but works OK in Outlook)



I'm finding when a mail is sent from a script, I get:

Warning: mail() [function.mail]: Failed to connect to mailserver at
"smtp.ntlworld.com" port 25, verify your "SMTP" and "smtp_port" setting in
php.ini or use ini_set() in C:\Documents and Settings\
However, when using Outlook and setting the SMTP agent in that to
smtp.ntlworld.com, on the same PC, mail is sent fine (using Outlook)
without any problems.

Can anyone think what might be the problem here?
Martin
Jul 17 '05 #1
2 5733
Martin Lucas-Smith wrote:

I'm finding when a mail is sent from a script, I get:

Warning: mail() [function.mail]: Failed to connect to mailserver at
"smtp.ntlworld.com" port 25, verify your "SMTP" and "smtp_port" setting in
php.ini or use ini_set() in C:\Documents and Settings\
However, when using Outlook and setting the SMTP agent in that to
smtp.ntlworld.com, on the same PC, mail is sent fine (using Outlook)
without any problems.

Can anyone think what might be the problem here?


First - I'm currently seeing varying types of weirdness from
smtp.ntlworld.com (which amongst other things tries to be clever about
blocking relaying (i.e. not just simply using the mechanisms built into the
MTA) and limiting virus outbreaks) so it may not be your code / config. NTL
are aware of issues and are currently advising customers to use their
webmail service (!).

Having said that, it's most likely your fault ;) !

Check your firewall - because of the architecture of the IP stack in
MSWindows, most firewall programs have visibility of the application
attempting to connect and can implement a policy accordingly.

If that's not the problem, it's worth checking that PHP is able to resolve
the name correctly. Also try connecting using fsockopen instead.

HTH

C.
Jul 17 '05 #2

Did you change your php.ini file? Your Outlook session is perhaps
correctly configured to 'know' that the SMTP server is smtp.ntlworld.com
however chances are, unless you've changed it, php.ini will use
localhost as its SMTP. Read: http://ca.php.net/manual/en/ref.mail.php

Hope that helps...
Randell D.

Martin Lucas-Smith wrote:

I'm finding when a mail is sent from a script, I get:

Warning: mail() [function.mail]: Failed to connect to mailserver at
"smtp.ntlworld.com" port 25, verify your "SMTP" and "smtp_port" setting in
php.ini or use ini_set() in C:\Documents and Settings\
However, when using Outlook and setting the SMTP agent in that to
smtp.ntlworld.com, on the same PC, mail is sent fine (using Outlook)
without any problems.

Can anyone think what might be the problem here?
Martin

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Corey | last post by:
I'm running Windows/Outlook XP with mail routed through POP3/SMTP university servers. Abruptly, I am no longer able to send mail, though receiving works fine. I get an error message saying that...
5
by: John J. Hughes II | last post by:
I have an application that sends simple e-mails using SMTP, it no longer works with a lot of e-mail servers. Basically the problem seems to be that I am no longer sending a valid logon sequence....
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
1
by: oliu321 | last post by:
Hi, I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket programming and SMTP protocol, a VB version using CDO and a C# version using...
2
by: oliu321 | last post by:
Hi, First I am not trying to write a client to talk with hotmail straightly. I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
5
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link...
7
by: Rob Dob | last post by:
The following code is giving me a timeout problem., no matter what I do I can't send a piece of mail using .net2.0 System.Net.Mail.SmtpClient via port 465 and using ssl, if however I try using...
5
by: Carmine [www.thetotalsite.it] | last post by:
Hi everyone, I get a really odd error while using SMTPClient.Send() function in ASP.Net. The error is the following: Dim smtp As New Net.Mail.SmtpClient("smtp.thetotalsite.it", 25) Dim bodyMSG...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.