473,799 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail(): ' Warning: Failed to Connect in ... on line ...'

Hi everybody,
I'm a newbie using PHP4 and Apache 1.3 on Win98.

When I launch a script just having this instruction:

mail ("te**********@ example.com", "My Subject", "My message");

I got this annoying message:

Warning: Failed to Connect in myscript.php on line ...

Of course the e-mail address provided is a real one; I have also
changed in the following way the values in php.ini file :

SMTP=localhost;
se************* **************@ my.provider.com

Do you have any hints or suggestions ?

Any help will be very appreciated, thank you in advance.
Kind regards,
Paolo
Jul 17 '05 #1
2 3859
Paolo wrote:
changed in the following way the values in php.ini file :

SMTP=localhost;


Do you have a SMTP server installed on your computer?
Try changing to SMTP=smtp.mypro vider.com

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #2
"Paolo" <ps****@tiscali net.it> wrote in message
news:07******** *************** *********@4ax.c om...
Hi everybody,
I'm a newbie using PHP4 and Apache 1.3 on Win98.

When I launch a script just having this instruction:

mail ("te**********@ example.com", "My Subject", "My message");

I got this annoying message:

Warning: Failed to Connect in myscript.php on line ...

Of course the e-mail address provided is a real one; I have also
changed in the following way the values in php.ini file :

SMTP=localhost;
se************* **************@ my.provider.com

Do you have any hints or suggestions ?


You need to run a mail server on your machine to receive the outgoing email.
I assume this is a development environment as you're running Windows 98. I
use a product called PostCast Server which is a freebie, I'm not sure if it
works on Win98 though.

Pablo
Jul 17 '05 #3

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

Similar topics

2
3309
by: Safras Ahamed | last post by:
I have windows xp pc and i have installed apache as a web server and php also working fine, but when i am sending mail, its giving me following error when upload same to linux live server its working, please help me what do i have to do for this Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
8
5483
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
5
2155
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. --------------------------------------------------------------------------------
34
18276
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
5
12333
by: universalbitmapper | last post by:
Hi, I'm trying to send an e-mail from a .php script and ie6 returns this error: 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:\wamp\www\PAMWD\chap11email\sendmail.php on line 12
1
3449
by: apasj06 | last post by:
hello everyone: I am trying to send email via php. I using window XP home edition. My mail client is outlook express. I configured mail client to send email via my aol email account. mail server information: mail account: imap.aol.com
4
2661
by: mmr315 | last post by:
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:\Apache2.2\htdocs\mail.php on line 7 i changed in php.ini SMTP=192.168.1.50 smtp_port=25 ;for win32 only sendmail_from = email_removed@your_domain.com
1
2249
by: Nelliwinne | last post by:
I do not have proper excellence at php programming. I wrote below script after reading several articles. Anyway that form-to-mail script doesn't work. form action is connected to following code <?php require_once "send1.php"; $from = "Sandra Sender <user@myweb.com.com>"; $to = "Ramona Recipient <myemail@gmail.com>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?";
4
2248
borisding
by: borisding | last post by:
Hi there, Well, I really need help from someone here, and hope that someone will answer my question and solve my problem. I know it's very common question and being asked by many developers: Basically i keep getting warning message and unable to send out email: Warning: mail(): Failed to connect to mailserver at "mail.xxxx.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in...
0
9685
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
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
10470
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10247
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
10214
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
6803
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
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2935
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.