On May 29, 11:51 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Rajendran wrote:
I want to send mail through PHP using the MS Exchange server.
My php.ini file looks like this (for the MAIL functions)
-------
[mail function]
; For Win32 only.
SMTP = exchgserver.tes t.com
smtp_port = 25
; For Win32 only.
sendmail_from = thegood...@test .com
-------
The following extensions have been loaded as well.
extension=php_i map.dll
extension=php_l dap.dll
After making these changes there were no errors/warnings. But I'm
unable to send any mails.
What are the other changes that i should do to send mails?
Do you actually have host exchgserver.tes t.com? What happens if you try
to ping it from your command line?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
When I try to ping that server it says "Request Time out"
I've configured my outlook with this server and I'm using it to send
and receive mails.
<?php
//change this to your email.
$to = "ra*@yahoo.com" ;
$from = "ra*@test.c om";
$subject = "Hello! This is HTML email";
//begin message
$message = <<<EOF
<html>
<body bgcolor="#DCEEF C">
<center>
<b>Looool!!! I am reciving HTML email......</b<br>
<font color="red">Tha nks!</font<br>
<a href="http://www.gmail.com/">Gmail</a>
</center>
<br><br>*** Now you Can send HTML Email through PHP<br>
Regards<br>Raje n
</body>
</html>
EOF;
//end of message
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$to = "$to, $from"; // this will send to both emails at the same
time.
// now lets send the email.
$mail_sent = @mail($to, $subject, $message, $headers);
echo $mail_sent ? "Mail sent" : "Mail failed";
?>
That is the php script which i copied from phpfreaks.com