473,387 Members | 1,664 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,387 software developers and data experts.

configure mail client to work with php.ini file?

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

server information: incoming mail: imap.aol.com / port: 143
outgoing mail: smtp.aol.com / port: 587

I changed php.ini file in order to match my email client setting
//original setting
;SMTP = localhost
;smtp_port = 25

//new setting
SMTP = smtp.aol.com
smtp_port = 587

No matter which setting I use, I always got this error message

when I test my php file I got following error
"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:\Program Files\Apache
Group\Apache2\htdocs\exer\chapter5\phpemail.php on line 28"

I test my connection to localhost port25 by issuing following command
in dos prompt:
telnet localhost 25

I got error message:
Connecting To localhost...Could not open connection to the host, on
port 25: Connect failed

<?php
$from = "mike <na**@aol.com>";
$to = "na**@yahoo.com";

$subject = "Agenda for tomorrow's metting";

$message ="In tomorrow's meeting, we will discuss our new marketing
campaign and
third-quarter sales results.";

$headers = "From: $from";

$messageSend = mail($to, $subject, $message, $headers);

if($messageSend)
{
echo "<p>The following message was send successfully:</p><hr />";
echo "<p>from: $from</p>";
echo "<p>to: $to</p>";
echo "<p>subject: $subject;</p>";
echo "<p>message: $message</p>";

}

else
echo "<p>the message was not send successfully!</p>";
?>

--Please give me some suggestion on how to configure my php.ini file
and mail client so I can send email via php script. Thanks in advanced

Jeff
11-5-06

Nov 6 '06 #1
1 3418
apasj06 wrote:
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

server information: incoming mail: imap.aol.com / port: 143
outgoing mail: smtp.aol.com / port: 587

I changed php.ini file in order to match my email client setting
//original setting
;SMTP = localhost
;smtp_port = 25

//new setting
SMTP = smtp.aol.com
smtp_port = 587

No matter which setting I use, I always got this error message

when I test my php file I got following error
"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:\Program Files\Apache
Group\Apache2\htdocs\exer\chapter5\phpemail.php on line 28"

I test my connection to localhost port25 by issuing following command
in dos prompt:
telnet localhost 25

I got error message:
Connecting To localhost...Could not open connection to the host, on
port 25: Connect failed

<?php
$from = "mike <na**@aol.com>";
$to = "na**@yahoo.com";

$subject = "Agenda for tomorrow's metting";

$message ="In tomorrow's meeting, we will discuss our new marketing
campaign and
third-quarter sales results.";

$headers = "From: $from";

$messageSend = mail($to, $subject, $message, $headers);

if($messageSend)
{
echo "<p>The following message was send successfully:</p><hr />";
echo "<p>from: $from</p>";
echo "<p>to: $to</p>";
echo "<p>subject: $subject;</p>";
echo "<p>message: $message</p>";

}

else
echo "<p>the message was not send successfully!</p>";
?>

--Please give me some suggestion on how to configure my php.ini file
and mail client so I can send email via php script. Thanks in advanced

Jeff
11-5-06
Jeff,

Are you sure you're changing the correct php.ini file? What does
phpinfo() tell you?

Also - does your smtp server require authorization? If so, you'll have
to authorize yourself before sending the mail.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Nov 6 '06 #2

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

Similar topics

0
by: Roy Shaw | last post by:
When configuring PHP5 (5.0.3) to use the mysqli libraries I get a "No such file or directory" from the configure script. My goal is to get PHP5 running with mysql 4.1.09 with both the mysql and...
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
8
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 -------------------------------------------------------------------------------- ...
2
by: Robbie De Sutter | last post by:
Hello, How do I open a new, empty e-mail message from the default e-mail client whereby the sender is given and a file is attached? Currently I use the command (vb.net): ---...
1
by: Markus Wollny | last post by:
Hi! I am trying to build PostgreSQL 7.4.3 with Java enabled; I've got Apache Ant version 1.5 and j2sdk1.4.1_05 installed: Verifiying ant: # which javac /usr/java/j2sdk1.4.1_05/bin/javac #...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
14
by: david | last post by:
I have developed web forms including login by using ASP.NET via HTTP. Now I want to secure the connection from client to the server via HTTPS. How can I configure the server or something else to...
13
by: José Joye | last post by:
Hello, What is the best way to stop a remoting server (Singleton SAO) that has been started with RemotingConfiguration.Configure(). For sure, I want to do this without quitting the application...
10
by: subhadip | last post by:
Hi, I want to generate New mail alert for any mail client at client side . I want to check if any new mail has arrived in my inbox or not . the mail client be anything . I want to do this for...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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.