473,791 Members | 3,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om, 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 5766
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.c om, 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.c om (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.c om
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.c om, 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
1500
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 Outlook couldn't connect with the outgoing server. No account settings have changed (I've checked) and I can still telnet to the SMTP server (but not through port 25)and send mail through a web-based university system. I do not have any Norton...
5
2229
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. The server says the user is not authorized, if I switch to Outlook it works. Code to send authorizion. this.SendData("AUTH LOGIN" + CRLF);
3
5589
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 account. I was using optimum online service with smtp server as “mail.optonline.net”. I can receive email correctly. Now I switch to verizon DSL. I change my smtp server accordingly as
1
3208
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 System.Net.Mail. Now all of them works great with any email account but hotmail. So here is the C# code: MailAddress from = new MailAddress("ZZZ@CCC.com", "XXX"); MailAddress to = new MailAddress("SSS@hotmail.com", "YYY");
2
3622
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 programming and SMTP protocol, a VB version using CDO and a C# version using System.Net.Mail. Now all of them works great with any email account but hotmail. So here is the C# code:
7
7749
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 free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
5
4223
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 mailto://mymail@domail.com. But this only works if the user has configured Outlook or something. Many users use web-based mails here so if I do so, Outlook Express's a new account wizard will pop-up. Futhure more this reveals user e-mails. Some people...
7
22880
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 outlook or outlook express it works fine.. System.Net.Mail.MailMessage msgMail = new System.Net.Mail.MailMessage("myemail@mydomain.com", "testemail@mydomain.com", "subject", "message body");
5
6657
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 As String bodyMSG = "something" smtp.Send("something@thetotalsite.it", someone@gmail.com, "Message from thetotalsite", bodyMSG)
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.