You are here: configure mail client to work with php.ini file? « PHP Programming Language « IT news, forums, messages
configure mail client to work with php.ini file?

Posted by apasj06 on 11/06/06 20:59

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 <name@aol.com>";
$to = "name@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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация